Derive std::cmp::Reverse as Copy or Clone
If the type parameter is Copy or Clone, then `Reverse` should be too.
This commit is contained in:
parent
73ac5d6a80
commit
96157ef842
1 changed files with 1 additions and 1 deletions
|
|
@ -343,7 +343,7 @@ impl Ordering {
|
|||
/// v.sort_by_key(|&num| (num > 3, Reverse(num)));
|
||||
/// assert_eq!(v, vec![3, 2, 1, 6, 5, 4]);
|
||||
/// ```
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
||||
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
|
||||
pub struct Reverse<T>(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue