Skip to content

Commit e589538

Browse files
alexcrichtonBurntSushi
authored andcommitted
Add #[inline] to cast methods
Avoids function calls in release builds!
1 parent c949c3d commit e589538

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/macros.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ macro_rules! define_casts {
249249
($(($ty:ident, $floatty:ident, $floatcast:ident)),+) => {
250250
$(
251251
impl $ty {
252+
#[inline]
252253
pub fn $floatcast(self) -> ::$floatty {
253254
unsafe { simd_cast(self) }
254255
}

0 commit comments

Comments
 (0)