Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1aacad2

Browse files
committed
Use clap macro for metadata
1 parent 663f7ed commit 1aacad2

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)

AltStyle によって変換されたページ (->オリジナル) /