Skip to content

Commit d4e5b0a

Browse files
committed
Use to_f* in ToPrimitive impl
1 parent 542884d commit d4e5b0a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/cast.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,9 @@ macro_rules! impl_to_primitive_nonzero {
292292
fn to_u32 -> u32;
293293
fn to_u64 -> u64;
294294
fn to_u128 -> u128;
295-
}
296295

297-
#[inline]
298-
fn to_f32(&self) -> Option<f32> {
299-
Some(self.get() as f32)
300-
}
301-
#[inline]
302-
fn to_f64(&self) -> Option<f64> {
303-
Some(self.get() as f64)
296+
fn to_f32 -> f32;
297+
fn to_f64 -> f64;
304298
}
305299
}
306300
};

0 commit comments

Comments
 (0)