Skip to content

Commit 72a975d

Browse files
committed
Made Float inherit 'static, Send, Sync
This makes it easier to use it in multi-thread code.
1 parent fcd0b47 commit 72a975d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use std::ops::*;
55

66
/// Convenience trait for floats.
77
pub trait Float:
8-
Copy + Radians + One + Zero + Sqrt
8+
'static + Send + Sync
9+
+ Copy + Radians + One + Zero + Sqrt
910
+ FromPrimitive
1011
+ Min + Max + Signum + Powf
1112
+ Trig
@@ -20,7 +21,8 @@ pub trait Float:
2021
+ Trig {}
2122

2223
impl<T> Float for T where
23-
T: Copy + Radians + One + Zero + Sqrt
24+
T: 'static + Send + Sync
25+
+ Copy + Radians + One + Zero + Sqrt
2426
+ FromPrimitive
2527
+ Min + Max + Signum + Powf
2628
+ Trig

0 commit comments

Comments
 (0)