We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed6a638 commit cf1d1edCopy full SHA for cf1d1ed
tests/it/src/commands/env.rs
@@ -9,7 +9,6 @@ pub(super) mod function {
9
fn repr(text: &std::ffi::OsStr) -> String {
10
text.to_str()
11
.filter(|s| !s.chars().any(|c| c == '"' || c == '\n'))
12
- .map(ToOwned::to_owned)
13
- .unwrap_or_else(|| format!("{text:?}"))
+ .map_or_else(|| format!("{text:?}"), ToOwned::to_owned)
14
}
15
0 commit comments