chore: Clippy

This commit is contained in:
EmperorBale 2022-07-15 14:04:44 -07:00 committed by Mike Welsh
parent 19605cff45
commit 67dd53ac9f
1 changed files with 1 additions and 3 deletions

View File

@ -112,9 +112,7 @@ impl WString {
return Self::from_buf(b);
}
let is_wide = AvmUtf8Decoder::new(tail)
.find(|ch| *ch > u8::MAX.into())
.is_some();
let is_wide = AvmUtf8Decoder::new(tail).any(|ch| ch > u8::MAX.into());
if is_wide {
let mut buf = Vec::new();
buf.extend(ascii.iter().map(|c| u16::from(*c)));