Skip to content

Commit

Permalink
fix: help参数不管用了,修修
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed Feb 2, 2023
1 parent 9282d69 commit 6c0aa31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use args_parse::Args;
fn main() {
let args = match Args::try_parse(){
Ok(a) => a,
Err(e) if e.kind() == clap::error::ErrorKind::DisplayHelp => Args::parse() ,
Err(e) if e.kind() == clap::error::ErrorKind::DisplayVersion => Args::parse() ,
_ => {
//没给参数,手动获取下
let mut buff = String::new();
Expand Down

0 comments on commit 6c0aa31

Please sign in to comment.