clippy: rewrite comparison chains
chunk_stream one can be collapsed, since split == split_to with at set to buffer.len() anyway. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
1 parent
81b2a87232
commit
43313c2ee7
4 files changed
+10
-8
No files matched your search
+4
-2
@@ -196,9 +196,11 @@ impl<'a> ACLEntry<'a> {
|
||||
|
||||
for &perm in &[ACL_READ, ACL_WRITE, ACL_EXECUTE] {
|
||||
res = unsafe { acl_get_perm(permset, perm) };
|
||||
if res < 0 {
|
||||
if res < 0 {
|
||||
return Err(Errno::last());
|
||||
} else if res > 0 {
|
||||
}
|
||||
|
||||
if res == 1 {
|
||||
permissions |= perm as u64;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user