From b955481fcac403811243ba1b4bec52676d8199a0 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 23 Dec 2024 14:55:58 +0100 Subject: [PATCH] test_client: Remove redundant `headers()` fn This returns essentially the same as the `headers()` fn of the inner `response`, so we might as well take advantage of the `Deref` implementation. This also avoids unnecessary cloning. --- axum/src/test_helpers/test_client.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/axum/src/test_helpers/test_client.rs b/axum/src/test_helpers/test_client.rs index 3786ee1855..7a177aa569 100644 --- a/axum/src/test_helpers/test_client.rs +++ b/axum/src/test_helpers/test_client.rs @@ -168,10 +168,6 @@ impl TestResponse { self.response.json().await.unwrap() } - pub(crate) fn headers(&self) -> http::HeaderMap { - self.response.headers().clone() - } - pub(crate) async fn chunk(&mut self) -> Option { self.response.chunk().await.unwrap() }