From 09958b8292da4badb421eba2ac08f94bc58252e3 Mon Sep 17 00:00:00 2001 From: Brooks Prumo Date: Wed, 15 Sep 2021 15:31:28 -0500 Subject: [PATCH] remove redundant type aliases --- bucket_map/src/bucket.rs | 5 +---- bucket_map/src/bucket_map.rs | 4 ++-- bucket_map/src/index_entry.rs | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bucket_map/src/bucket.rs b/bucket_map/src/bucket.rs index c03e8cdfe6..78472cd08f 100644 --- a/bucket_map/src/bucket.rs +++ b/bucket_map/src/bucket.rs @@ -1,4 +1,4 @@ -use crate::bucket_map::{BucketMapError, BucketMapKeyValue}; +use crate::bucket_map::{BucketMapError, BucketMapKeyValue, MaxSearch, RefCount}; use crate::data_bucket::{BucketMapStats, DataBucket}; use crate::index_entry::IndexEntry; use rand::thread_rng; @@ -12,9 +12,6 @@ use std::ops::RangeBounds; use std::path::PathBuf; use std::sync::atomic::Ordering; use std::sync::Arc; -pub type MaxSearch = u8; - -type RefCount = u64; // >= 2 instances of this per 'bucket' in the bucket map. 1 for index, >= 1 for data pub struct Bucket { diff --git a/bucket_map/src/bucket_map.rs b/bucket_map/src/bucket_map.rs index 2cc1ec29f6..1babfb77bc 100644 --- a/bucket_map/src/bucket_map.rs +++ b/bucket_map/src/bucket_map.rs @@ -11,9 +11,9 @@ use std::path::PathBuf; use std::sync::Arc; use std::sync::RwLock; use tempfile::TempDir; -pub type MaxSearch = u8; -type RefCount = u64; +pub type MaxSearch = u8; +pub type RefCount = u64; pub struct BucketMapKeyValue { pub pubkey: Pubkey, diff --git a/bucket_map/src/index_entry.rs b/bucket_map/src/index_entry.rs index 8b05f5efbb..a5ae3246a8 100644 --- a/bucket_map/src/index_entry.rs +++ b/bucket_map/src/index_entry.rs @@ -1,12 +1,11 @@ use crate::bucket::Bucket; -use crate::data_bucket::{ DataBucket}; +use crate::bucket_map::RefCount; +use crate::data_bucket::DataBucket; use solana_sdk::pubkey::Pubkey; use std::collections::hash_map::DefaultHasher; use std::fmt::Debug; use std::hash::{Hash, Hasher}; -type RefCount = u64; - type NumSlots = u64; #[repr(C)] @@ -62,4 +61,3 @@ impl IndexEntry { s.finish().max(1u64) } } -