Take self by value (Self is Copy here)
This commit is contained in:
parent
c478efbe6a
commit
4a88614c4f
@ -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()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user