std: add missing #[inline] annotation to the f64 arithmetic trait impls.
This commit is contained in:
parent
f8cf234b34
commit
317412a302
1 changed files with 4 additions and 0 deletions
|
|
@ -278,18 +278,22 @@ impl One for f64 {
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
impl Add<f64,f64> for f64 {
|
impl Add<f64,f64> for f64 {
|
||||||
|
#[inline]
|
||||||
fn add(&self, other: &f64) -> f64 { *self + *other }
|
fn add(&self, other: &f64) -> f64 { *self + *other }
|
||||||
}
|
}
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
impl Sub<f64,f64> for f64 {
|
impl Sub<f64,f64> for f64 {
|
||||||
|
#[inline]
|
||||||
fn sub(&self, other: &f64) -> f64 { *self - *other }
|
fn sub(&self, other: &f64) -> f64 { *self - *other }
|
||||||
}
|
}
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
impl Mul<f64,f64> for f64 {
|
impl Mul<f64,f64> for f64 {
|
||||||
|
#[inline]
|
||||||
fn mul(&self, other: &f64) -> f64 { *self * *other }
|
fn mul(&self, other: &f64) -> f64 { *self * *other }
|
||||||
}
|
}
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
impl Div<f64,f64> for f64 {
|
impl Div<f64,f64> for f64 {
|
||||||
|
#[inline]
|
||||||
fn div(&self, other: &f64) -> f64 { *self / *other }
|
fn div(&self, other: &f64) -> f64 { *self / *other }
|
||||||
}
|
}
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue