Skip to content

Commit 11ce976

Browse files
committed
clippy: fix up into_iter and clone-on-copy
1 parent 3138a0e commit 11ce976

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

http-body-util/src/collected.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<B: Buf> Collected<B> {
5353

5454
if let Ok(trailers) = frame.into_trailers() {
5555
if let Some(current) = &mut self.trailers {
56-
current.extend(trailers.into_iter());
56+
current.extend(trailers);
5757
} else {
5858
self.trailers = Some(trailers);
5959
}

http-body-util/src/empty.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ impl<D> Default for Empty<D> {
5757

5858
impl<D> Clone for Empty<D> {
5959
fn clone(&self) -> Self {
60-
Self {
61-
_marker: PhantomData,
62-
}
60+
*self
6361
}
6462
}
6563

0 commit comments

Comments
 (0)