Skip to content

Commit 3711fc1

Browse files
committed
Remove some unnecessary clones.
I found these by grepping for `&[a-z_\.]*\.clone()`, i.e. expressions like `&a.b.clone()`, which are sometimes unnecessary clones, and also looking at clones nearby to cases like that.
1 parent 2ab28f3 commit 3711fc1

File tree

1 file changed

+1
-1
lines changed
  • alloc/src/collections/btree

1 file changed

+1
-1
lines changed

alloc/src/collections/btree/set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub struct Iter<'a, T: 'a> {
139139
#[stable(feature = "collection_debug", since = "1.17.0")]
140140
impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
141141
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
142-
f.debug_tuple("Iter").field(&self.iter.clone()).finish()
142+
f.debug_tuple("Iter").field(&self.iter).finish()
143143
}
144144
}
145145

0 commit comments

Comments
 (0)