Skip to content

Commit

Permalink
nydus: fix a possible panic caused by SubCmdArgs::is_present()
Browse files Browse the repository at this point in the history
Fix a possible panic caused by SubCmdArgs::is_present().

Signed-off-by: Jiang Liu <[email protected]>
  • Loading branch information
jiangliu committed Mar 28, 2023
1 parent 667189b commit a278cea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl<'a> ServiceArgs for SubCmdArgs<'a> {

fn is_present(&self, key: &str) -> bool {
self.subargs.get_flag(key) || self.args.get_flag(key)
//self.subargs.try_get_one::<bool>(key).is_ok() || self.args.try_get_one::<bool>(key).is_ok()
}
}

Expand Down

0 comments on commit a278cea

Please sign in to comment.