File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ pub enum DefaultHashBuilder {}
1818
1919/// A hash map implemented with quadratic probing and SIMD lookup.
2020///
21- /// The default hashing algorithm is currently [AHash], though this is
21+ /// The default hashing algorithm is currently [` AHash` ], though this is
2222/// subject to change at any point in the future. This hash function is very
2323/// fast for all types of keys, but this algorithm will typically *not* protect
2424/// against attacks such as HashDoS.
@@ -145,7 +145,7 @@ pub enum DefaultHashBuilder {}
145145/// [`with_hasher`]: #method.with_hasher
146146/// [`with_capacity_and_hasher`]: #method.with_capacity_and_hasher
147147/// [`fnv`]: https://crates.io/crates/fnv
148- /// [AHash]: https://crates.io/crates/ahash
148+ /// [` AHash` ]: https://crates.io/crates/ahash
149149///
150150/// ```
151151/// use hashbrown::HashMap;
Original file line number Diff line number Diff line change @@ -73,18 +73,20 @@ impl Fallibility {
7373 /// Error to return on capacity overflow.
7474 #[ inline]
7575 fn capacity_overflow ( self ) -> CollectionAllocErr {
76+ use Fallibility :: * ;
7677 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" ) ,
7980 }
8081 }
8182
8283 /// Error to return on allocation error.
8384 #[ inline]
8485 fn alloc_err ( self , layout : Layout ) -> CollectionAllocErr {
86+ use Fallibility :: * ;
8587 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) ,
8890 }
8991 }
9092}
You can’t perform that action at this time.
0 commit comments