mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
refactor(axum): hoist std::hash import to the top of the module
Move the `BuildHasher`/`Hasher` import out of `random_duration` and into the module-level `use` block. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
d46e0fc99c
commit
e5410160df
@@ -5,6 +5,7 @@ use std::{
|
|||||||
error::Error as StdError,
|
error::Error as StdError,
|
||||||
fmt::Debug,
|
fmt::Debug,
|
||||||
future::{Future, IntoFuture},
|
future::{Future, IntoFuture},
|
||||||
|
hash::{BuildHasher, Hasher},
|
||||||
io,
|
io,
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
pin::pin,
|
pin::pin,
|
||||||
@@ -253,7 +254,6 @@ fn random_duration(max: Duration) -> Duration {
|
|||||||
return Duration::ZERO;
|
return Duration::ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
use std::hash::{BuildHasher, Hasher};
|
|
||||||
let rand = std::collections::hash_map::RandomState::new()
|
let rand = std::collections::hash_map::RandomState::new()
|
||||||
.build_hasher()
|
.build_hasher()
|
||||||
.finish();
|
.finish();
|
||||||
|
|||||||
Reference in New Issue
Block a user