From 467ca5685da5edb5ac775c86eeeb3fe50fa20a1f Mon Sep 17 00:00:00 2001 From: tottoto Date: Mon, 29 Jul 2024 23:34:38 +0900 Subject: [PATCH] chore: remove unnecessary type converting --- src/hpack/encoder.rs | 2 +- src/hpack/test/fixture.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hpack/encoder.rs b/src/hpack/encoder.rs index bd49056f..06ccda40 100644 --- a/src/hpack/encoder.rs +++ b/src/hpack/encoder.rs @@ -695,7 +695,7 @@ mod test { fn encode(e: &mut Encoder, hdrs: Vec>>) -> BytesMut { let mut dst = BytesMut::with_capacity(1024); - e.encode(&mut hdrs.into_iter(), &mut dst); + e.encode(hdrs, &mut dst); dst } diff --git a/src/hpack/test/fixture.rs b/src/hpack/test/fixture.rs index d3f76e3b..ed2f11c2 100644 --- a/src/hpack/test/fixture.rs +++ b/src/hpack/test/fixture.rs @@ -107,7 +107,7 @@ fn test_story(story: Value) { }) .collect(); - encoder.encode(&mut input.clone().into_iter(), &mut buf); + encoder.encode(input.clone(), &mut buf); decoder .decode(&mut Cursor::new(&mut buf), |e| {