@@ -1457,7 +1457,7 @@ pub struct RawEntryBuilderMut<'a, K, V, S> {
1457
1457
/// [`RawEntryBuilderMut`]: struct.RawEntryBuilderMut.html
1458
1458
pub enum RawEntryMut < ' a , K , V , S > {
1459
1459
/// An occupied entry.
1460
- Occupied ( RawOccupiedEntryMut < ' a , K , V > ) ,
1460
+ Occupied ( RawOccupiedEntryMut < ' a , K , V , S > ) ,
1461
1461
/// A vacant entry.
1462
1462
Vacant ( RawVacantEntryMut < ' a , K , V , S > ) ,
1463
1463
}
@@ -1466,21 +1466,24 @@ pub enum RawEntryMut<'a, K, V, S> {
1466
1466
/// It is part of the [`RawEntryMut`] enum.
1467
1467
///
1468
1468
/// [`RawEntryMut`]: enum.RawEntryMut.html
1469
- pub struct RawOccupiedEntryMut < ' a , K , V > {
1469
+ pub struct RawOccupiedEntryMut < ' a , K , V , S > {
1470
1470
elem : Bucket < ( K , V ) > ,
1471
1471
table : & ' a mut RawTable < ( K , V ) > ,
1472
+ hash_builder : & ' a S ,
1472
1473
}
1473
1474
1474
- unsafe impl < K , V > Send for RawOccupiedEntryMut < ' _ , K , V >
1475
+ unsafe impl < K , V , S > Send for RawOccupiedEntryMut < ' _ , K , V , S >
1475
1476
where
1476
1477
K : Send ,
1477
1478
V : Send ,
1479
+ S : Sync ,
1478
1480
{
1479
1481
}
1480
- unsafe impl < K , V > Sync for RawOccupiedEntryMut < ' _ , K , V >
1482
+ unsafe impl < K , V , S > Sync for RawOccupiedEntryMut < ' _ , K , V , S >
1481
1483
where
1482
1484
K : Sync ,
1483
1485
V : Sync ,
1486
+ S : Sync ,
1484
1487
{
1485
1488
}
1486
1489
@@ -1549,6 +1552,7 @@ impl<'a, K, V, S> RawEntryBuilderMut<'a, K, V, S> {
1549
1552
Some ( elem) => RawEntryMut :: Occupied ( RawOccupiedEntryMut {
1550
1553
elem,
1551
1554
table : & mut self . map . table ,
1555
+ hash_builder : & self . map . hash_builder ,
1552
1556
} ) ,
1553
1557
None => RawEntryMut :: Vacant ( RawVacantEntryMut {
1554
1558
table : & mut self . map . table ,
@@ -1623,7 +1627,7 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> {
1623
1627
/// assert_eq!(entry.remove_entry(), ("horseyland", 37));
1624
1628
/// ```
1625
1629
#[ cfg_attr( feature = "inline-more" , inline) ]
1626
- pub fn insert ( self , key : K , value : V ) -> RawOccupiedEntryMut < ' a , K , V >
1630
+ pub fn insert ( self , key : K , value : V ) -> RawOccupiedEntryMut < ' a , K , V , S >
1627
1631
where
1628
1632
K : Hash ,
1629
1633
S : BuildHasher ,
@@ -1780,7 +1784,7 @@ impl<'a, K, V, S> RawEntryMut<'a, K, V, S> {
1780
1784
}
1781
1785
}
1782
1786
1783
- impl < ' a , K , V > RawOccupiedEntryMut < ' a , K , V > {
1787
+ impl < ' a , K , V , S > RawOccupiedEntryMut < ' a , K , V , S > {
1784
1788
/// Gets a reference to the key in the entry.
1785
1789
#[ cfg_attr( feature = "inline-more" , inline) ]
1786
1790
pub fn key ( & self ) -> & K {
@@ -1934,7 +1938,7 @@ impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> {
1934
1938
}
1935
1939
1936
1940
#[ cfg_attr( feature = "inline-more" , inline) ]
1937
- fn insert_entry ( self , key : K , value : V ) -> RawOccupiedEntryMut < ' a , K , V >
1941
+ fn insert_entry ( self , key : K , value : V ) -> RawOccupiedEntryMut < ' a , K , V , S >
1938
1942
where
1939
1943
K : Hash ,
1940
1944
S : BuildHasher ,
@@ -1949,6 +1953,7 @@ impl<'a, K, V, S> RawVacantEntryMut<'a, K, V, S> {
1949
1953
RawOccupiedEntryMut {
1950
1954
elem,
1951
1955
table : self . table ,
1956
+ hash_builder : self . hash_builder ,
1952
1957
}
1953
1958
}
1954
1959
}
@@ -1968,7 +1973,7 @@ impl<K: Debug, V: Debug, S> Debug for RawEntryMut<'_, K, V, S> {
1968
1973
}
1969
1974
}
1970
1975
1971
- impl < K : Debug , V : Debug > Debug for RawOccupiedEntryMut < ' _ , K , V > {
1976
+ impl < K : Debug , V : Debug , S > Debug for RawOccupiedEntryMut < ' _ , K , V , S > {
1972
1977
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1973
1978
f. debug_struct ( "RawOccupiedEntryMut" )
1974
1979
. field ( "key" , self . key ( ) )
0 commit comments