Skip to content

Commit

Permalink
clippy: fix up into_iter and clone-on-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Nov 15, 2023
1 parent 3138a0e commit 11ce976
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion http-body-util/src/collected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<B: Buf> Collected<B> {

if let Ok(trailers) = frame.into_trailers() {
if let Some(current) = &mut self.trailers {
current.extend(trailers.into_iter());
current.extend(trailers);
} else {
self.trailers = Some(trailers);
}
Expand Down
4 changes: 1 addition & 3 deletions http-body-util/src/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ impl<D> Default for Empty<D> {

impl<D> Clone for Empty<D> {
fn clone(&self) -> Self {
Self {
_marker: PhantomData,
}
*self
}
}

Expand Down

0 comments on commit 11ce976

Please sign in to comment.