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 74ecfc7 commit 2279c34Copy full SHA for 2279c34
src/escape.rs
@@ -29,7 +29,7 @@ fn whitelisted(byte: u8) -> bool {
29
///
30
pub fn escape(s: &OsStr) -> Cow<'_, OsStr> {
31
let s = s.as_bytes();
32
- let all_whitelisted = s.iter().all(|x| whitelisted(*x));
+ let all_whitelisted = s.iter().copied().all(whitelisted);
33
34
if !s.is_empty() && all_whitelisted {
35
return OsString::from_vec(s.to_vec()).into();
0 commit comments