From 330334cca2fe6b0109c3150ea652f012e27c74e0 Mon Sep 17 00:00:00 2001 From: jeff washington Date: Tue, 21 Mar 2023 16:08:05 -0500 Subject: [PATCH] remove uid parameter from try_lock --- bucket_map/src/bucket_storage.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bucket_map/src/bucket_storage.rs b/bucket_map/src/bucket_storage.rs index c87925800968b7..5173fb20b0a2ff 100644 --- a/bucket_map/src/bucket_storage.rs +++ b/bucket_map/src/bucket_storage.rs @@ -51,9 +51,9 @@ struct Header { impl Header { /// try to lock this entry with 'uid' /// return true if it could be locked - fn try_lock(&mut self, uid: Uid) -> bool { + fn try_lock(&mut self) -> bool { if self.lock == UID_UNLOCKED { - self.lock = uid; + self.lock = UID_LOCKED; true } else { false @@ -173,7 +173,7 @@ impl BucketStorage { assert!(ix < self.capacity(), "allocate: bad index size"); let mut e = Err(BucketStorageError::AlreadyAllocated); //debug!("ALLOC {} {}", ix, uid); - if self.header_mut_ptr(ix).try_lock(UID_LOCKED) { + if self.header_mut_ptr(ix).try_lock() { e = Ok(()); if !is_resizing { self.count.fetch_add(1, Ordering::Relaxed);