Clippy fixes

This commit is contained in:
mdecimus
2024-06-18 15:30:41 +02:00
parent aa4a11baf7
commit ae2a67422f
15 changed files with 459 additions and 148 deletions

View File

@@ -405,7 +405,7 @@ impl ManageDirectory for Store {
principal.inner.name.as_bytes().to_vec(),
)));
principal.inner.name = new_name.clone();
principal.inner.name.clone_from(&new_name);
batch.set(
ValueClass::Directory(DirectoryClass::NameToId(new_name.into_bytes())),

View File

@@ -104,10 +104,10 @@ impl<T: Hash + Eq> LookupCache<T> {
}
}
pub fn get<Q: ?Sized>(&mut self, name: &Q) -> Option<bool>
pub fn get<Q>(&mut self, name: &Q) -> Option<bool>
where
T: Borrow<Q>,
Q: Hash + Eq,
Q: Hash + Eq + ?Sized,
{
// Check positive cache
if let Some(valid_until) = self.cache_pos.get_mut(name) {