diff options
| author | Chris Gregory <czipperz@gmail.com> | 2019-06-05 21:11:02 -0700 |
|---|---|---|
| committer | Chris Gregory <czipperz@gmail.com> | 2019-06-05 21:11:09 -0700 |
| commit | 4a88614c4f46e1786a5bf2ce650631cc250a6edb (patch) | |
| tree | 45b5f19dcf8f877b43cf74f2e5ee465a96214d80 | |
| parent | c478efbe6a2e324910f2f82db7d03a6476215ca2 (diff) | |
| download | rust-4a88614c4f46e1786a5bf2ce650631cc250a6edb.tar.gz rust-4a88614c4f46e1786a5bf2ce650631cc250a6edb.zip | |
Take self by value (Self is Copy here)
| -rw-r--r-- | src/libcore/ops/range.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<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()), |
