mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
std: add missing #[inline] annotation to the f64 arithmetic trait impls.
This commit is contained in:
parent
f8cf234b34
commit
317412a302
@ -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…
Reference in New Issue
Block a user