diff --git a/src/storage/rocksdb.rs b/src/storage/rocksdb.rs index 8d0c35a5ec..9f5ebf8d21 100644 --- a/src/storage/rocksdb.rs +++ b/src/storage/rocksdb.rs @@ -223,10 +223,7 @@ impl RocksDB { ) -> Result>, StorageError> { let buckets = self.bucket_map.read().unwrap(); let key = bucket_key(org_id, name); - match buckets.get(&key) { - Some(b) => Ok(Some(b.clone())), - None => Ok(None), - } + Ok(buckets.get(&key).map(Arc::clone)) } // TODO: ensure that points with timestamps older than the first index level get matched against the appropriate index