From b39997bb47dc7ae123bc241484e1aa76eb68957f Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Wed, 26 Jun 2024 14:44:35 -0700 Subject: [PATCH] Fix warning --- lib/src/component/http_resp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/component/http_resp.rs b/lib/src/component/http_resp.rs index 4992ee7b..dd3756d4 100644 --- a/lib/src/component/http_resp.rs +++ b/lib/src/component/http_resp.rs @@ -5,7 +5,6 @@ use { cfg_if::cfg_if, http::{HeaderName, HeaderValue}, hyper::http::response::Response, - std::str::FromStr, }; const MAX_HEADER_NAME_LEN: usize = (1 << 16) - 1; @@ -137,6 +136,7 @@ impl http_resp::Host for Session { let _ = (h, name, max_len, cursor); return Err(Error::FatalError("A fatal error occurred in the test-only implementation of header_values_get".to_string()).into()); } else { + use std::str::FromStr; if name.len() > MAX_HEADER_NAME_LEN { return Err(Error::InvalidArgument.into()); }