X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/d620665f6b2e1ae5db4c98a09e35bd63133ae87f..c4b892b16fb92c7d89eaee0b1588c52c8836216b:/src/command/version.rs?ds=sidebyside diff --git a/src/command/version.rs b/src/command/version.rs index fae7596..e566c5a 100644 --- a/src/command/version.rs +++ b/src/command/version.rs @@ -1,4 +1,5 @@ use std::io::Result; +use crate::configuration::Configuration; pub struct Version; @@ -13,8 +14,9 @@ impl super::Command for Version { vec![] } - fn execute(&self, input: Option<&String>) -> Result<()> { - println!("Version: {:?}!", input); + fn execute(&self, _: Option<&String>, _: &Configuration, _: &String) -> Result<()> { + let version = env!("CARGO_PKG_VERSION"); + println!("{}", version); return Ok(()) }