diff options
| author | M Farkas-Dyck <strake888@gmail.com> | 2018-08-09 01:27:48 -0800 |
|---|---|---|
| committer | M Farkas-Dyck <strake888@gmail.com> | 2018-08-09 01:27:48 -0800 |
| commit | b78201aee550045246e824000a35bf445a84c7ee (patch) | |
| tree | 8c7413288beccd3055e90cc884ad66b00d3e01ae /src/libcore/cmp.rs | |
| parent | ebe8df41d70d8763e0a15aefe078b035d3519214 (diff) | |
| download | rust-b78201aee550045246e824000a35bf445a84c7ee.tar.gz rust-b78201aee550045246e824000a35bf445a84c7ee.zip | |
inline some short functions
Diffstat (limited to 'src/libcore/cmp.rs')
| -rw-r--r-- | src/libcore/cmp.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 3626a266ad5..58d6c4f5e09 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -469,6 +469,7 @@ pub trait Ord: Eq + PartialOrd<Self> { /// assert_eq!(2, 2.max(2)); /// ``` #[stable(feature = "ord_max_min", since = "1.21.0")] + #[inline] fn max(self, other: Self) -> Self where Self: Sized { if other >= self { other } else { self } @@ -485,6 +486,7 @@ pub trait Ord: Eq + PartialOrd<Self> { /// assert_eq!(2, 2.min(2)); /// ``` #[stable(feature = "ord_max_min", since = "1.21.0")] + #[inline] fn min(self, other: Self) -> Self where Self: Sized { if self <= other { self } else { other } |
