Add #[inline] to is_one.

This commit is contained in:
Clar Charr 2018-02-23 17:44:07 -05:00
parent 45856ee846
commit 51dad501aa
1 changed files with 1 additions and 0 deletions

View File

@ -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()
}