File tree Expand file tree Collapse file tree 2 files changed +9
-29
lines changed Expand file tree Collapse file tree 2 files changed +9
-29
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ edition = "2018"
13
13
14
14
[dependencies ]
15
15
# For the default hasher
16
- ahash = { version = " 0.6.1 " , default-features = false , optional = true }
16
+ ahash = { version = " 0.7.0 " , default-features = false , optional = true }
17
17
18
18
# For external trait impls
19
19
rayon = { version = " 1.0" , optional = true }
Original file line number Diff line number Diff line change @@ -251,20 +251,10 @@ where
251
251
Q : Hash + ?Sized ,
252
252
S : BuildHasher ,
253
253
{
254
- #[ cfg( feature = "ahash" ) ]
255
- {
256
- //This enables specialization to improve performance on primitive types
257
- use ahash:: CallHasher ;
258
- let state = hash_builder. build_hasher ( ) ;
259
- Q :: get_hash ( val, state)
260
- }
261
- #[ cfg( not( feature = "ahash" ) ) ]
262
- {
263
- use core:: hash:: Hasher ;
264
- let mut state = hash_builder. build_hasher ( ) ;
265
- val. hash ( & mut state) ;
266
- state. finish ( )
267
- }
254
+ use core:: hash:: Hasher ;
255
+ let mut state = hash_builder. build_hasher ( ) ;
256
+ val. hash ( & mut state) ;
257
+ state. finish ( )
268
258
}
269
259
270
260
#[ cfg_attr( feature = "inline-more" , inline) ]
@@ -273,20 +263,10 @@ where
273
263
K : Hash ,
274
264
S : BuildHasher ,
275
265
{
276
- #[ cfg( feature = "ahash" ) ]
277
- {
278
- //This enables specialization to improve performance on primitive types
279
- use ahash:: CallHasher ;
280
- let state = hash_builder. build_hasher ( ) ;
281
- K :: get_hash ( val, state)
282
- }
283
- #[ cfg( not( feature = "ahash" ) ) ]
284
- {
285
- use core:: hash:: Hasher ;
286
- let mut state = hash_builder. build_hasher ( ) ;
287
- val. hash ( & mut state) ;
288
- state. finish ( )
289
- }
266
+ use core:: hash:: Hasher ;
267
+ let mut state = hash_builder. build_hasher ( ) ;
268
+ val. hash ( & mut state) ;
269
+ state. finish ( )
290
270
}
291
271
292
272
#[ cfg( feature = "ahash" ) ]
You can’t perform that action at this time.
0 commit comments