fix clippy warnings

This commit is contained in:
Heikki Linnakangas
2025-07-31 14:45:13 +03:00
parent 84f4dcd2be
commit c509d53cd1

View File

@@ -481,12 +481,12 @@ impl<'t> IntegratedCacheWriteAccess<'t> {
break;
}
Entry::Vacant(e) => {
if let Ok(_) = e.insert(BlockEntry {
if e.insert(BlockEntry {
lw_lsn: AtomicLsn::new(lw_lsn.0),
cache_block: AtomicU64::new(cache_block),
pinned: AtomicU64::new(0),
referenced: AtomicBool::new(true),
}) {
}).is_ok() {
break;
} else {
// The hash map was full. Evict an entry and retry.
@@ -538,12 +538,12 @@ impl<'t> IntegratedCacheWriteAccess<'t> {
break;
}
Entry::Vacant(e) => {
if let Ok(_) = e.insert(BlockEntry {
if e.insert(BlockEntry {
lw_lsn: AtomicLsn::new(lw_lsn.0),
cache_block: AtomicU64::new(cache_block),
pinned: AtomicU64::new(0),
referenced: AtomicBool::new(true),
}) {
}).is_ok() {
break;
} else {
// The hash map was full. Evict an entry and retry.
@@ -880,12 +880,12 @@ impl<'t> IntegratedCacheReadAccess<'t> {
}
}
Entry::Vacant(e) => {
if let Ok(_) = e.insert(BlockEntry {
if e.insert(BlockEntry {
lw_lsn: AtomicLsn::new(lsn.0),
cache_block: AtomicU64::new(INVALID_CACHE_BLOCK),
pinned: AtomicU64::new(0),
referenced: AtomicBool::new(true),
}) {
}).is_ok() {
false
} else {
// The hash table is full.