From 4a88614c4f46e1786a5bf2ce650631cc250a6edb Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Wed, 5 Jun 2019 21:11:02 -0700 Subject: [PATCH] Take self by value (Self is Copy here) --- src/libcore/ops/range.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/ops/range.rs b/src/libcore/ops/range.rs index ddcf3addf39..763020c478f 100644 --- a/src/libcore/ops/range.rs +++ b/src/libcore/ops/range.rs @@ -710,7 +710,7 @@ impl Bound<&T> { /// assert_eq!((1..12).start_bound().cloned(), Included(1)); /// ``` #[unstable(feature = "bound_cloned", issue = "61356")] - pub fn cloned(&self) -> Bound { + pub fn cloned(self) -> Bound { match *self { Bound::Unbounded => Bound::Unbounded, Bound::Included(x) => Bound::Included(x.clone()), -- 2.44.0