Skip to content

Commit 683ac30

Browse files
authored
Merge pull request #6 from ldm0/auto_crate_version
Use clap macro for metadata
2 parents 663f7ed + 1aacad2 commit 683ac30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cli.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ use crate::{
77
err::Error,
88
flag::{Debug, Flag},
99
};
10-
use clap::{App, AppSettings};
10+
use clap::{App, AppSettings, crate_name, crate_authors, crate_version};
1111

1212
/// Get maches
1313
pub fn main() -> Result<(), Error> {
14-
let m = App::new("leetcode")
15-
.author("clearloop <udtrokia@163.com>")
16-
.version("0.2.14")
14+
let m = App::new(crate_name!())
15+
.author(crate_authors!("\n"))
16+
.version(crate_version!())
1717
.about("May the Code be with You 👻")
1818
.subcommands(vec![
1919
DataCommand::usage().display_order(1),

0 commit comments

Comments
 (0)