Skip to content

Commit

Permalink
refactor(proto): remove redundant reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored and seanmonstar committed May 19, 2024
1 parent b13b32a commit 3b858ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/proto/h1/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ impl ChunkedState {
fn decode_trailers(buf: &mut BytesMut, count: usize) -> Result<HeaderMap, io::Error> {
let mut trailers = HeaderMap::new();
let mut headers = vec![httparse::EMPTY_HEADER; count];
let res = httparse::parse_headers(&buf, &mut headers);
let res = httparse::parse_headers(buf, &mut headers);
match res {
Ok(httparse::Status::Complete((_, headers))) => {
for header in headers.iter() {
Expand Down
4 changes: 2 additions & 2 deletions src/proto/h1/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ impl Encoder {
) -> Option<EncodedBuf<B>> {
trace!("encoding trailers");
match &self.kind {
Kind::Chunked(Some(ref allowed_trailer_fields)) => {
let allowed_trailer_field_map = allowed_trailer_field_map(&allowed_trailer_fields);
Kind::Chunked(Some(allowed_trailer_fields)) => {
let allowed_trailer_field_map = allowed_trailer_field_map(allowed_trailer_fields);

let mut cur_name = None;
let mut allowed_trailers = HeaderMap::new();
Expand Down

0 comments on commit 3b858ed

Please sign in to comment.