From 7fab5a960e3648b7d22ae70ee41aaa05c7d381f3 Mon Sep 17 00:00:00 2001 From: quake wang Date: Sun, 27 Jan 2019 13:36:07 +0900 Subject: [PATCH] fix: version output --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index d32280a..6d57dc5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,7 @@ -use clap::{App, Arg, ArgGroup, SubCommand}; +use clap::{ + app_from_crate, crate_authors, crate_description, crate_name, crate_version, Arg, ArgGroup, + SubCommand, +}; use fern::colors::{Color, ColoredLevelConfig}; use log::{debug, error, info}; use std::{ @@ -104,10 +107,7 @@ fn find_cargo_projects(root: &Path, include_hidden: bool) -> Vec { } fn main() { - let matches = App::new("Cargo sweep") - .version("0.1") - .author("Viktor Holmgren ") - .about("Clean old/unused Cargo artifacts") + let matches = app_from_crate!() .subcommand( SubCommand::with_name("sweep") .arg(