From 9a75267021a9723a978c83a1b162c035786a5ddb Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 13 Sep 2023 18:12:17 +0200 Subject: [PATCH] clippy --- cli/src/base_cli/commands/register_tcb_info.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cli/src/base_cli/commands/register_tcb_info.rs b/cli/src/base_cli/commands/register_tcb_info.rs index 209d889c82..2cfcf37549 100644 --- a/cli/src/base_cli/commands/register_tcb_info.rs +++ b/cli/src/base_cli/commands/register_tcb_info.rs @@ -65,12 +65,10 @@ impl RegisterTcbInfoCommand { let fmspcs: Vec = fmspcs.json().expect("Error parsing JSON"); println!("{:?}", fmspcs); fmspcs.into_iter().map(|f| f.fmspc).collect() + } else if let Some(fmspc) = self.fmspc.clone() { + vec![fmspc] } else { - if let Some(fmspc) = self.fmspc.clone() { - vec![fmspc] - } else { - panic!("must specify either '--all' or '--fmspc'"); - } + panic!("must specify either '--all' or '--fmspc'"); }; let mut nonce = chain_api.get_nonce().unwrap(); let xt_hashes: Vec<(String, Option)> = fmspcs