From e5410160dff858b01885bb5d5a53d4eb300b84ed Mon Sep 17 00:00:00 2001 From: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com> Date: Tue, 26 May 2026 12:00:50 -0500 Subject: [PATCH] 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) --- axum/src/serve/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum/src/serve/mod.rs b/axum/src/serve/mod.rs index 5e9dd489..3e1abd2e 100644 --- a/axum/src/serve/mod.rs +++ b/axum/src/serve/mod.rs @@ -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();