Skip to content

Commit

Permalink
test_client: Remove redundant headers() fn
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Turbo87 committed Dec 23, 2024
1 parent 4471709 commit b955481
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions axum/src/test_helpers/test_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Bytes> {
self.response.chunk().await.unwrap()
}
Expand Down

0 comments on commit b955481

Please sign in to comment.