Skip to content

Commit

Permalink
Take self by value (Self is Copy here)
Browse files Browse the repository at this point in the history
  • Loading branch information
czipperz committed Jun 6, 2019
1 parent c478efb commit 4a88614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/ops/range.rs
Expand Up @@ -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()),
Expand Down

0 comments on commit 4a88614

Please sign in to comment.