]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/version.rs
Deal with all lints
[rbdr/blog] / src / command / version.rs
index fae75961bc79957394ad67ea92679a9c21729164..94eb92e7c51f95ebe4f1adcf0d48b21bfdf6b9e7 100644 (file)
@@ -1,3 +1,4 @@
+use crate::configuration::Configuration;
 use std::io::Result;
 
 pub struct Version;
@@ -13,9 +14,10 @@ impl super::Command for Version {
         vec![]
     }
 
-    fn execute(&self, input: Option<&String>) -> Result<()> {
-        println!("Version: {:?}!", input);
-        return Ok(())
+    fn execute(&self, _: Option<&String>, _: &Configuration, _: &str) -> Result<()> {
+        let version = env!("CARGO_PKG_VERSION");
+        println!("{version}");
+        Ok(())
     }
 
     fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {