From c509d53cd1c9f28c47e09d155e31020b3cd3b013 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 31 Jul 2025 14:45:13 +0300 Subject: [PATCH] fix clippy warnings --- pgxn/neon/communicator/src/integrated_cache.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pgxn/neon/communicator/src/integrated_cache.rs b/pgxn/neon/communicator/src/integrated_cache.rs index abcd8d682a..6a335546a3 100644 --- a/pgxn/neon/communicator/src/integrated_cache.rs +++ b/pgxn/neon/communicator/src/integrated_cache.rs @@ -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.