avoid some clippy warnings

This commit is contained in:
Dietmar Maurer
2019-10-25 18:44:51 +02:00
parent f58f426e86
commit 834a2f95a0
13 changed files with 71 additions and 80 deletions

View File

@ -79,7 +79,7 @@ impl ACL {
return Err(Errno::last());
}
Ok(ACL { ptr: ptr })
Ok(ACL { ptr })
}
pub fn get_file<P: AsRef<Path>>(path: P, acl_type: ACLType) -> Result<ACL, nix::errno::Errno> {
@ -89,7 +89,7 @@ impl ACL {
return Err(Errno::last());
}
Ok(ACL { ptr: ptr })
Ok(ACL { ptr })
}
pub fn set_file<P: AsRef<Path>>(&self, path: P, acl_type: ACLType) -> Result<(), nix::errno::Errno> {
@ -108,7 +108,7 @@ impl ACL {
return Err(Errno::last());
}
Ok(ACL { ptr: ptr })
Ok(ACL { ptr })
}
pub fn create_entry<'a>(&'a mut self) -> Result<ACLEntry<'a>, nix::errno::Errno> {
@ -119,7 +119,7 @@ impl ACL {
}
Ok(ACLEntry {
ptr: ptr,
ptr,
_phantom: PhantomData,
})
}

View File

@ -155,7 +155,7 @@ mod tests {
}
let invalid_name_length = PxarXAttr {
name: name,
name,
value: b"err".to_vec(),
};