Add #[inline] to cast methods

Avoids function calls in release builds!
This commit is contained in:
Alex Crichton 2017-06-19 12:21:12 -07:00 committed by Andrew Gallant
parent da7dc55140
commit 91a4849bba

View file

@ -249,6 +249,7 @@ macro_rules! define_casts {
($(($ty:ident, $floatty:ident, $floatcast:ident)),+) => {
$(
impl $ty {
#[inline]
pub fn $floatcast(self) -> ::$floatty {
unsafe { simd_cast(self) }
}