about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-04-24 08:49:49 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-04-24 11:12:34 +1000
commit055a27da2afcc8a7d74a551c32e8a831a825d549 (patch)
tree0e167ff7afcba57293c846f18ea79f112db4ed66 /library/alloc/src
parentb8c54d6358926028ac2fab1ec2b8665c70edb1c0 (diff)
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.
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/collections/btree/set.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs
index 041f80c1f2c..7ad9e59dfed 100644
--- a/library/alloc/src/collections/btree/set.rs
+++ b/library/alloc/src/collections/btree/set.rs
@@ -139,7 +139,7 @@ pub struct Iter<'a, T: 'a> {
 #[stable(feature = "collection_debug", since = "1.17.0")]
 impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.debug_tuple("Iter").field(&self.iter.clone()).finish()
+        f.debug_tuple("Iter").field(&self.iter).finish()
     }
 }