Skip to content

Commit ed52eff

Browse files
authored
Use copied() instead of cloned() for u16 iterator (#884)
1 parent e04a670 commit ed52eff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/stdext/src/collections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl<'a> BString<'a> {
190190
pub fn push_utf16_lossy(&mut self, alloc: &'a dyn Allocator, string: &[u16]) {
191191
self.extend(
192192
alloc,
193-
char::decode_utf16(string.iter().cloned())
193+
char::decode_utf16(string.iter().copied())
194194
.map(|r| r.unwrap_or(char::REPLACEMENT_CHARACTER)),
195195
);
196196
}

0 commit comments

Comments
 (0)