Skip to content

Commit 1932893

Browse files
committed
Thanks clippy
1 parent 449f277 commit 1932893

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/it/src/commands/env.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub(super) mod function {
99
fn repr(text: &std::ffi::OsStr) -> String {
1010
text.to_str()
1111
.filter(|s| !s.chars().any(|c| c == '"' || c == '\n'))
12-
.map(ToOwned::to_owned)
13-
.unwrap_or_else(|| format!("{text:?}"))
12+
.map_or_else(|| format!("{text:?}"), ToOwned::to_owned)
1413
}
1514
}

0 commit comments

Comments
 (0)