mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-07 00:00:15 +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,
|
||||
fmt::Debug,
|
||||
future::{Future, IntoFuture},
|
||||
hash::{BuildHasher, Hasher},
|
||||
io,
|
||||
marker::PhantomData,
|
||||
pin::pin,
|
||||
@@ -253,7 +254,6 @@ fn random_duration(max: Duration) -> Duration {
|
||||
return Duration::ZERO;
|
||||
}
|
||||
|
||||
use std::hash::{BuildHasher, Hasher};
|
||||
let rand = std::collections::hash_map::RandomState::new()
|
||||
.build_hasher()
|
||||
.finish();
|
||||
|
||||
Reference in New Issue
Block a user