mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-19 14:07:19 +02:00
fix: clippy as_chunks lint
This commit is contained in:
1 parent
6d1393993a
commit
88dde52c25
1 file changed
+4
-2
@@ -113,8 +113,10 @@ fn decode_string(bytes: &[u8]) -> Option<String> {
|
||||
return None;
|
||||
}
|
||||
let units: Vec<u16> = rest
|
||||
.chunks_exact(2)
|
||||
.map(|pair| u16::from_le_bytes([pair[0], pair[1]]))
|
||||
.as_chunks::<2>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|&pair| u16::from_le_bytes(pair))
|
||||
.collect();
|
||||
String::from_utf16(&units).ok()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user