diff --git a/src/api2/types/userid.rs b/src/api2/types/userid.rs index 85c1edd1..20ce9370 100644 --- a/src/api2/types/userid.rs +++ b/src/api2/types/userid.rs @@ -277,7 +277,7 @@ impl PartialEq<&str> for RealmRef { impl PartialEq for Realm { fn eq(&self, rhs: &RealmRef) -> bool { - self.0 == &rhs.0 + self.0 == rhs.0 } } diff --git a/src/backup/file_formats.rs b/src/backup/file_formats.rs index f0caa430..a25263f2 100644 --- a/src/backup/file_formats.rs +++ b/src/backup/file_formats.rs @@ -63,11 +63,11 @@ pub struct EncryptedDataBlobHeader { /// /// Panics on unknown magic numbers. pub fn header_size(magic: &[u8; 8]) -> usize { - match magic { - &UNCOMPRESSED_BLOB_MAGIC_1_0 => std::mem::size_of::(), - &COMPRESSED_BLOB_MAGIC_1_0 => std::mem::size_of::(), - &ENCRYPTED_BLOB_MAGIC_1_0 => std::mem::size_of::(), - &ENCR_COMPR_BLOB_MAGIC_1_0 => std::mem::size_of::(), + match *magic { + UNCOMPRESSED_BLOB_MAGIC_1_0 => std::mem::size_of::(), + COMPRESSED_BLOB_MAGIC_1_0 => std::mem::size_of::(), + ENCRYPTED_BLOB_MAGIC_1_0 => std::mem::size_of::(), + ENCR_COMPR_BLOB_MAGIC_1_0 => std::mem::size_of::(), _ => panic!("unknown blob magic"), } } diff --git a/src/tape/inventory.rs b/src/tape/inventory.rs index 26d72528..8babcbf5 100644 --- a/src/tape/inventory.rs +++ b/src/tape/inventory.rs @@ -382,7 +382,7 @@ impl Inventory { let set_list = self.map.values() .filter_map(|entry| entry.id.media_set_label.as_ref()) - .filter(|set| &set.pool == &pool && set.uuid.as_ref() != [0u8;16]); + .filter(|set| set.pool == pool && set.uuid.as_ref() != [0u8;16]); for set in set_list { match last_set { @@ -405,7 +405,7 @@ impl Inventory { // consistency check - must be the only set with that ctime let set_list = self.map.values() .filter_map(|entry| entry.id.media_set_label.as_ref()) - .filter(|set| &set.pool == &pool && set.uuid.as_ref() != [0u8;16]); + .filter(|set| set.pool == pool && set.uuid.as_ref() != [0u8;16]); for set in set_list { if set.uuid != uuid && set.ctime >= ctime { // should not happen @@ -436,7 +436,7 @@ impl Inventory { let set_list = self.map.values() .filter_map(|entry| entry.id.media_set_label.as_ref()) - .filter(|set| (&set.uuid != media_set_uuid) && (&set.pool == &pool)); + .filter(|set| (&set.uuid != media_set_uuid) && (set.pool == pool)); let mut next_ctime = None;