Skip to content

Commit 4c884c8

Browse files
committed
impl From<NotNan<f32>> for NotNan<f64>
Fixes #58.
1 parent 39f76bb commit 4c884c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,14 @@ impl TryFrom<f64> for NotNan<f64> {
315315
}
316316
}
317317

318+
impl From<NotNan<f32>> for NotNan<f64> {
319+
fn from(v: NotNan<f32>) -> NotNan<f64> {
320+
unsafe {
321+
NotNan::unchecked_new(v.0 as f64)
322+
}
323+
}
324+
}
325+
318326
impl<T: Float> Deref for NotNan<T> {
319327
type Target = T;
320328

0 commit comments

Comments
 (0)