Skip to content

Commit 8ad61ce

Browse files
committed
Rename HashTable::buckets to num_buckets
1 parent 95a2cdd commit 8ad61ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/table.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -777,19 +777,19 @@ where
777777
/// table.insert_unique(hasher(&3), (3, 'c'), |val| hasher(&val.0));
778778
///
779779
/// // Each entry is available at some index in the bucket range.
780-
/// let count = (0..table.buckets())
780+
/// let count = (0..table.num_buckets())
781781
/// .filter_map(|i| table.get_bucket(i))
782782
/// .count();
783783
/// assert_eq!(count, 3);
784784
///
785-
/// assert_eq!(table.get_bucket(table.buckets()), None);
785+
/// assert_eq!(table.get_bucket(table.num_buckets()), None);
786786
/// # }
787787
/// # fn main() {
788788
/// # #[cfg(feature = "nightly")]
789789
/// # test()
790790
/// # }
791791
/// ```
792-
pub fn buckets(&self) -> usize {
792+
pub fn num_buckets(&self) -> usize {
793793
self.raw.buckets()
794794
}
795795

0 commit comments

Comments
 (0)