We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3df25ae commit 6b0d44eCopy full SHA for 6b0d44e
library/core/src/cmp.rs
@@ -357,7 +357,7 @@ impl Ordering {
357
#[inline]
358
#[must_use]
359
#[stable(feature = "rust1", since = "1.0.0")]
360
- pub fn reverse(self) -> Ordering {
+ pub const fn reverse(self) -> Ordering {
361
match self {
362
Less => Greater,
363
Equal => Equal,
@@ -395,7 +395,7 @@ impl Ordering {
395
396
397
#[stable(feature = "ordering_chaining", since = "1.17.0")]
398
- pub fn then(self, other: Ordering) -> Ordering {
+ pub const fn then(self, other: Ordering) -> Ordering {
399
400
Equal => other,
401
_ => self,
0 commit comments