Skip to content

Commit 4697f3b

Browse files
committed
removed unnecessary match
1 parent 2a8e45e commit 4697f3b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

program/rust/build_utils.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ impl UnwindSafe for DeriveAdderParserCallback<'_> {}
2828

2929
impl ParseCallbacks for DeriveAdderParserCallback<'_>{
3030
fn add_derives(&self, _name: &str) -> Vec<String>{
31-
let traits = self.types_to_traits.get(_name);
32-
match traits{
33-
Some(trait_names)=>trait_names.to_vec(),
34-
None => vec![],
35-
}
31+
self.types_to_traits.get(_name).unwrap_or(&Vec::<String>::new()).to_vec()
3632
}
3733
}

0 commit comments

Comments
 (0)