mirror of
https://github.com/tobi/disktree.git
synced 2026-11-28 08:00:53 +00:00
windows: as_chunks instead of chunks_exact(2), which clippy 1.98 wants
This commit is contained in:
@@ -334,8 +334,10 @@ impl Records {
|
||||
};
|
||||
|
||||
let name: Vec<u16> = name_bytes
|
||||
.chunks_exact(2)
|
||||
.map(|pair| u16::from_ne_bytes([pair[0], pair[1]]))
|
||||
.as_chunks::<2>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|pair| u16::from_ne_bytes(*pair))
|
||||
.collect();
|
||||
if name == [u16::from(b'.')] || name == [u16::from(b'.'); 2] {
|
||||
return Ok((None, next));
|
||||
|
||||
Reference in New Issue
Block a user