about summary refs log tree commit diff
path: root/src/libcore/cmp.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-08-09 21:33:49 +0800
committerkennytm <kennytm@gmail.com>2018-08-10 01:01:27 +0800
commit410f63dbb799873c591fd78c41c2f3b0edb228fa (patch)
tree9c690a101391be4c460b8817c5b6d4d6022930d8 /src/libcore/cmp.rs
parentdb7494680331100f16620d694e57203d1ced50c7 (diff)
parentb78201aee550045246e824000a35bf445a84c7ee (diff)
downloadrust-410f63dbb799873c591fd78c41c2f3b0edb228fa.tar.gz
rust-410f63dbb799873c591fd78c41c2f3b0edb228fa.zip
Rollup merge of #53217 - strake:inline, r=nagisa
inline some short functions

I found these were outline in binaries i link. I think they ought to be inline, considering their size.
Diffstat (limited to 'src/libcore/cmp.rs')
-rw-r--r--src/libcore/cmp.rs2
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 }