Fetch the version from Cargo.toml
- ID
523ba58- date
2021-11-28 19:27:53+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
2390608- message
Fetch the version from Cargo.toml- changed files
1 file, 3 additions, 1 deletion
Changed files
src/main.rs (7716) → src/main.rs (7768)
diff --git a/src/main.rs b/src/main.rs
index 18a459b..771cc6a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,10 +8,12 @@ use image::imageops::FilterType;
use palette::{Lab, Pixel, Srgb, Srgba};
use kmeans_colors::{get_kmeans_hamerly};
+const VERSION: &str = env!("CARGO_PKG_VERSION");
+
fn main() {
let matches =
App::new("dominant_colours")
- .version("1.0")
+ .version(VERSION)
.author("Alex Chan <alex@alexwlchan.net>")
.about("Find the dominant colours in an image")
.arg(