Skip to content

Commit b67c4ad

Browse files
committed
Auto merge of #128 - jugglerchris:make_bucket_index_pub, r=Amanieu
Make RawTable::bucket_index() pub. As discussed in #117.
2 parents 4e7acb5 + abe8f1e commit b67c4ad

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
test,
2020
core_intrinsics,
2121
dropck_eyepatch,
22-
cfg_doctest,
2322
)
2423
)]
2524
#![allow(

src/map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
19671967
type Item = &'a K;
19681968

19691969
#[cfg_attr(feature = "inline-more", inline)]
1970-
fn next(&mut self) -> Option<(&'a K)> {
1970+
fn next(&mut self) -> Option<&'a K> {
19711971
self.inner.next().map(|(k, _)| k)
19721972
}
19731973
#[cfg_attr(feature = "inline-more", inline)]
@@ -1987,7 +1987,7 @@ impl<'a, K, V> Iterator for Values<'a, K, V> {
19871987
type Item = &'a V;
19881988

19891989
#[cfg_attr(feature = "inline-more", inline)]
1990-
fn next(&mut self) -> Option<(&'a V)> {
1990+
fn next(&mut self) -> Option<&'a V> {
19911991
self.inner.next().map(|(_, v)| v)
19921992
}
19931993
#[cfg_attr(feature = "inline-more", inline)]
@@ -2007,7 +2007,7 @@ impl<'a, K, V> Iterator for ValuesMut<'a, K, V> {
20072007
type Item = &'a mut V;
20082008

20092009
#[cfg_attr(feature = "inline-more", inline)]
2010-
fn next(&mut self) -> Option<(&'a mut V)> {
2010+
fn next(&mut self) -> Option<&'a mut V> {
20112011
self.inner.next().map(|(_, v)| v)
20122012
}
20132013
#[cfg_attr(feature = "inline-more", inline)]

src/raw/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl<T> RawTable<T> {
429429

430430
/// Returns the index of a bucket from a `Bucket`.
431431
#[cfg_attr(feature = "inline-more", inline)]
432-
unsafe fn bucket_index(&self, bucket: &Bucket<T>) -> usize {
432+
pub unsafe fn bucket_index(&self, bucket: &Bucket<T>) -> usize {
433433
if mem::size_of::<T>() == 0 {
434434
bucket.ptr as usize
435435
} else {

0 commit comments

Comments
 (0)