Parcourir la source

Add #[inline] to is_one.

Clar Charr il y a 7 ans
Parent
commit
51dad501aa
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/identities.rs

+ 1 - 0
src/identities.rs

@@ -85,6 +85,7 @@ pub trait One: Sized + Mul<Self, Output = Self> {
     /// For performance reasons, it's best to implement this manually.
     /// After a semver bump, this method will be required, and the
     /// `where Self: PartialEq` bound will be removed.
+    #[inline]
     fn is_one(&self) -> bool where Self: PartialEq {
         *self == Self::one()
     }