Skip to content

Commit 25b69c4

Browse files
committed
impl Default + Hash for ::core::cmp::Reverse
1 parent bedbad6 commit 25b69c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/cmp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl Ordering {
343343
/// v.sort_by_key(|&num| (num > 3, Reverse(num)));
344344
/// assert_eq!(v, vec![3, 2, 1, 6, 5, 4]);
345345
/// ```
346-
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
346+
#[derive(PartialEq, Eq, Debug, Copy, Clone, Default, Hash)]
347347
#[stable(feature = "reverse_cmp_key", since = "1.19.0")]
348348
pub struct Reverse<T>(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T);
349349

0 commit comments

Comments
 (0)