From a278cea9293d38fe008552be6f94a18ea662f4cc Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Tue, 28 Mar 2023 11:19:13 +0800 Subject: [PATCH] nydus: fix a possible panic caused by SubCmdArgs::is_present() Fix a possible panic caused by SubCmdArgs::is_present(). Signed-off-by: Jiang Liu --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 8b49a92156b..96d1f0fc588 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::(key).is_ok() || self.args.try_get_one::(key).is_ok() } }