Skip to content

Commit 82a5065

Browse files
committed
rustfmt
1 parent 866c8cc commit 82a5065

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

src/map.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ where
846846
Some(item) => unsafe {
847847
let &(ref key, ref value) = item.as_ref();
848848
Some((key, value))
849-
}
849+
},
850850
None => None,
851851
}
852852
}
@@ -886,7 +886,7 @@ where
886886
Some(item) => unsafe {
887887
let &mut (ref key, ref mut value) = item.as_mut();
888888
Some((key, value))
889-
}
889+
},
890890
None => None,
891891
}
892892
}
@@ -1592,7 +1592,7 @@ impl<'a, K, V, S> RawEntryBuilder<'a, K, V, S> {
15921592
Some(item) => unsafe {
15931593
let &(ref key, ref value) = item.as_ref();
15941594
Some((key, value))
1595-
}
1595+
},
15961596
None => None,
15971597
}
15981598
}
@@ -2062,7 +2062,7 @@ impl<'a, K, V> Iterator for Iter<'a, K, V> {
20622062
Some(x) => unsafe {
20632063
let r = x.as_ref();
20642064
Some((&r.0, &r.1))
2065-
}
2065+
},
20662066
None => None,
20672067
}
20682068
}
@@ -2090,7 +2090,7 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> {
20902090
Some(x) => unsafe {
20912091
let r = x.as_mut();
20922092
Some((&r.0, &mut r.1))
2093-
}
2093+
},
20942094
None => None,
20952095
}
20962096
}

src/raw/mod.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl<T> RawTable<T> {
406406
// Avoid `Option::ok_or_else` because it bloats LLVM IR.
407407
let (layout, ctrl_offset) = match calculate_layout::<T>(buckets) {
408408
Some(lco) => lco,
409-
None => return Err(fallability.capacity_overflow())
409+
None => return Err(fallability.capacity_overflow()),
410410
};
411411
let ptr = match NonNull::new(alloc(layout)) {
412412
Some(ptr) => ptr,
@@ -688,7 +688,10 @@ impl<T> RawTable<T> {
688688
*self = Self::with_capacity(min_size)
689689
} else {
690690
// Avoid `Result::unwrap_or_else` because it bloats LLVM IR.
691-
if self.resize(min_size, hasher, Fallibility::Infallible).is_err() {
691+
if self
692+
.resize(min_size, hasher, Fallibility::Infallible)
693+
.is_err()
694+
{
692695
unsafe { hint::unreachable_unchecked() }
693696
}
694697
}
@@ -701,7 +704,10 @@ impl<T> RawTable<T> {
701704
pub fn reserve(&mut self, additional: usize, hasher: impl Fn(&T) -> u64) {
702705
if additional > self.growth_left {
703706
// Avoid `Result::unwrap_or_else` because it bloats LLVM IR.
704-
if self.reserve_rehash(additional, hasher, Fallibility::Infallible).is_err() {
707+
if self
708+
.reserve_rehash(additional, hasher, Fallibility::Infallible)
709+
.is_err()
710+
{
705711
unsafe { hint::unreachable_unchecked() }
706712
}
707713
}
@@ -1114,7 +1120,7 @@ impl<T: Clone> Clone for RawTable<T> {
11141120
match Self::new_uninitialized(self.buckets(), Fallibility::Infallible) {
11151121
Ok(table) => table,
11161122
Err(_) => hint::unreachable_unchecked(),
1117-
}
1123+
},
11181124
);
11191125

11201126
new_table.clone_from_spec(self, |new_table| {
@@ -1151,7 +1157,7 @@ impl<T: Clone> Clone for RawTable<T> {
11511157
match Self::new_uninitialized(source.buckets(), Fallibility::Infallible) {
11521158
Ok(table) => table,
11531159
Err(_) => hint::unreachable_unchecked(),
1154-
}
1160+
},
11551161
);
11561162
}
11571163

0 commit comments

Comments
 (0)