Take self by value (Self is Copy here)

This commit is contained in:
Chris Gregory 2019-06-05 21:11:02 -07:00
parent c478efbe6a
commit 4a88614c4f

View 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()),