Skip to content

Commit a096ff7

Browse files
committed
FIX: Fix clippy manual_unwrap_or_default
1 parent 2ca7dbb commit a096ff7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cargo-miri/src/util.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,8 @@ pub fn get_miriflags() -> Vec<String> {
105105
if let Ok(a) = env::var("MIRIFLAGS") {
106106
// This code is taken from `RUSTFLAGS` handling in cargo.
107107
a.split(' ').map(str::trim).filter(|s| !s.is_empty()).map(str::to_string).collect()
108-
} else if let Ok(args) = serde_json::from_str::<Vec<String>>(config_miriflags) {
109-
args
110108
} else {
111-
Vec::default()
109+
serde_json::from_str::<Vec<String>>(config_miriflags).unwrap_or_default()
112110
}
113111
}
114112
/// Returns the path to the `miri` binary

0 commit comments

Comments
 (0)