Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5c96af

Browse files
authored
Merge pull request#664 from clarfonthey/num_buckets
Rename raw table buckets to num_buckets
2 parents0622304 +66621bd commitc5c96af

File tree

3 files changed

+135
-135
lines changed

3 files changed

+135
-135
lines changed

‎src/map.rs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ impl<K, V, S, A: Allocator> HashMap<K, V, S, A> {
809809
#[cfg(test)]
810810
#[cfg_attr(feature ="inline-more", inline)]
811811
fnraw_capacity(&self) ->usize{
812-
self.table.buckets()
812+
self.table.num_buckets()
813813
}
814814

815815
/// Returns the number of elements in the map.
@@ -6565,10 +6565,10 @@ mod test_map {
65656565
Ok(map) => map,
65666566
Err(msg) =>return msg,
65676567
};
6568-
if map.table.buckets() != scope_map.table.buckets(){
6568+
if map.table.num_buckets() != scope_map.table.num_buckets(){
65696569
returnformat!(
6570-
"map.table.buckets() != scope_map.table.buckets(),\nleft: `{}`,\nright: `{}`",
6571-
map.table.buckets(), scope_map.table.buckets()
6570+
"map.table.num_buckets() != scope_map.table.num_buckets(),\nleft: `{}`,\nright: `{}`",
6571+
map.table.num_buckets(), scope_map.table.num_buckets()
65726572
);
65736573
}
65746574
map.clone_from(&scope_map);
@@ -6590,7 +6590,7 @@ mod test_map {
65906590
assert_eq!(unsafe{ map.table.iter().count()},0);
65916591
assert_eq!(unsafe{ map.table.iter().iter.count()},0);
65926592

6593-
for idxin0..map.table.buckets(){
6593+
for idxin0..map.table.num_buckets(){
65946594
let idx = idxasu64;
65956595
assert!(
65966596
map.table.find(idx, |(k, _)|*k == idx).is_none(),
@@ -6633,10 +6633,10 @@ mod test_map {
66336633
Ok(map) => map,
66346634
Err(msg) =>return msg,
66356635
};
6636-
if map.table.buckets() == scope_map.table.buckets(){
6636+
if map.table.num_buckets() == scope_map.table.num_buckets(){
66376637
returnformat!(
6638-
"map.table.buckets() == scope_map.table.buckets(): `{}`",
6639-
map.table.buckets()
6638+
"map.table.num_buckets() == scope_map.table.num_buckets(): `{}`",
6639+
map.table.num_buckets()
66406640
);
66416641
}
66426642
map.clone_from(&scope_map);
@@ -6658,7 +6658,7 @@ mod test_map {
66586658
assert_eq!(unsafe{ map.table.iter().count()},0);
66596659
assert_eq!(unsafe{ map.table.iter().iter.count()},0);
66606660

6661-
for idxin0..map.table.buckets(){
6661+
for idxin0..map.table.num_buckets(){
66626662
let idx = idxasu64;
66636663
assert!(
66646664
map.table.find(idx, |(k, _)|*k == idx).is_none(),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp