mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-29 03:40:03 +00:00
io: clippy fix: replace map()
followed by any()
with just any()
this fixes a clippy lint that complains about map invocations followed by any invocations that are just checking for identity as this can be replaced by just the any invocation alone [1]. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
parent
b5e238613e
commit
2134657529
@ -14,8 +14,7 @@ const BUF_SIZE: usize = 8192;
|
||||
/// This is implemented in a way which allows the compiler to utilize SIMD instructions.
|
||||
pub fn buffer_is_zero(buf: &[u8]) -> bool {
|
||||
!buf.chunks(128)
|
||||
.map(|aa| aa.iter().fold(0, |a, b| a | b) != 0)
|
||||
.any(|a| a)
|
||||
.any(|aa| aa.iter().fold(0, |a, b| a | b) != 0)
|
||||
}
|
||||
|
||||
/// Result of a sparse copy call.
|
||||
|
Loading…
Reference in New Issue
Block a user