]> git.lizzy.rs Git - rust.git/commitdiff
Take self by value (Self is Copy here)
authorChris Gregory <czipperz@gmail.com>
Thu, 6 Jun 2019 04:11:02 +0000 (21:11 -0700)
committerChris Gregory <czipperz@gmail.com>
Thu, 6 Jun 2019 04:11:09 +0000 (21:11 -0700)
src/libcore/ops/range.rs

index ddcf3addf398f214b4cc5d96ea75e660947eb903..763020c478fba3a3582f371d45199ec12689da66 100644 (file)
@@ -710,7 +710,7 @@ impl<T: Clone> Bound<&T> {
     /// assert_eq!((1..12).start_bound().cloned(), Included(1));
     /// ```
     #[unstable(feature = "bound_cloned", issue = "61356")]
-    pub fn cloned(&self) -> Bound<T> {
+    pub fn cloned(self) -> Bound<T> {
         match *self {
             Bound::Unbounded => Bound::Unbounded,
             Bound::Included(x) => Bound::Included(x.clone()),