Skip to content

Commit e1d1a17

Browse files
author
Sujay Jayakar
committed
cargo fmt
1 parent 8481ce3 commit e1d1a17

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/map.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ where
13291329

13301330
impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S>
13311331
where
1332-
S: BuildHasher
1332+
S: BuildHasher,
13331333
{
13341334
/// Create a `RawEntryMut` from the given hash.
13351335
#[inline]
@@ -1637,16 +1637,20 @@ impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> {
16371637

16381638
/// Set the value of an entry with a custom hasher function.
16391639
#[inline]
1640-
pub fn insert_with_hasher<H>(self, hash: u64, key: K, value: V, hasher: H) -> (&'a mut K, &'a mut V)
1640+
pub fn insert_with_hasher<H>(
1641+
self,
1642+
hash: u64,
1643+
key: K,
1644+
value: V,
1645+
hasher: H,
1646+
) -> (&'a mut K, &'a mut V)
16411647
where
16421648
S: BuildHasher,
16431649
H: Fn(&K) -> u64,
16441650
{
16451651
self.table.reserve(1, |x| hasher(&x.0));
16461652
unsafe {
1647-
let elem = self
1648-
.table
1649-
.insert(hash, (key, value), |x| hasher(&x.0));
1653+
let elem = self.table.insert(hash, (key, value), |x| hasher(&x.0));
16501654
let &mut (ref mut key, ref mut value) = elem.as_mut();
16511655
(key, value)
16521656
}

0 commit comments

Comments
 (0)