File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub enum DefaultHashBuilder {}
18
18
19
19
/// A hash map implemented with quadratic probing and SIMD lookup.
20
20
///
21
- /// The default hashing algorithm is currently [AHash], though this is
21
+ /// The default hashing algorithm is currently [` AHash` ], though this is
22
22
/// subject to change at any point in the future. This hash function is very
23
23
/// fast for all types of keys, but this algorithm will typically *not* protect
24
24
/// against attacks such as HashDoS.
@@ -145,7 +145,7 @@ pub enum DefaultHashBuilder {}
145
145
/// [`with_hasher`]: #method.with_hasher
146
146
/// [`with_capacity_and_hasher`]: #method.with_capacity_and_hasher
147
147
/// [`fnv`]: https://crates.io/crates/fnv
148
- /// [AHash]: https://crates.io/crates/ahash
148
+ /// [` AHash` ]: https://crates.io/crates/ahash
149
149
///
150
150
/// ```
151
151
/// use hashbrown::HashMap;
Original file line number Diff line number Diff line change @@ -73,18 +73,20 @@ impl Fallibility {
73
73
/// Error to return on capacity overflow.
74
74
#[ inline]
75
75
fn capacity_overflow ( self ) -> CollectionAllocErr {
76
+ use Fallibility :: * ;
76
77
match self {
77
- Fallibility :: Fallible => CollectionAllocErr :: CapacityOverflow ,
78
- Fallibility :: Infallible => panic ! ( "Hash table capacity overflow" ) ,
78
+ Fallible => CollectionAllocErr :: CapacityOverflow ,
79
+ Infallible => panic ! ( "Hash table capacity overflow" ) ,
79
80
}
80
81
}
81
82
82
83
/// Error to return on allocation error.
83
84
#[ inline]
84
85
fn alloc_err ( self , layout : Layout ) -> CollectionAllocErr {
86
+ use Fallibility :: * ;
85
87
match self {
86
- Fallibility :: Fallible => CollectionAllocErr :: AllocErr { layout } ,
87
- Fallibility :: Infallible => handle_alloc_error ( layout) ,
88
+ Fallible => CollectionAllocErr :: AllocErr { layout } ,
89
+ Infallible => handle_alloc_error ( layout) ,
88
90
}
89
91
}
90
92
}
You can’t perform that action at this time.
0 commit comments