@@ -23,37 +23,37 @@ const RAND_SIZE: usize = 1 << RAND_SIZE_LEN;
23
23
#[ derive( Copy , Clone ) ]
24
24
#[ allow( missing_debug_implementations) ]
25
25
#[ cfg_attr( feature="serde-1" , derive( Serialize , Deserialize ) ) ]
26
- pub struct IsaacArray < T > where T : Default + Copy {
26
+ pub struct IsaacArray < T > {
27
27
#[ cfg_attr( feature="serde-1" , serde( with="isaac_array_serde" ) ) ]
28
28
#[ cfg_attr( feature="serde-1" , serde( bound(
29
29
serialize = "T: Serialize" ,
30
- deserialize = "T: Deserialize<'de>" ) ) ) ]
30
+ deserialize = "T: Deserialize<'de> + Copy + Default " ) ) ) ]
31
31
inner : [ T ; RAND_SIZE ]
32
32
}
33
33
34
- impl < T > :: core:: convert:: AsRef < [ T ] > for IsaacArray < T > where T : Default + Copy {
34
+ impl < T > :: core:: convert:: AsRef < [ T ] > for IsaacArray < T > {
35
35
#[ inline( always) ]
36
36
fn as_ref ( & self ) -> & [ T ] {
37
37
& self . inner [ ..]
38
38
}
39
39
}
40
40
41
- impl < T > :: core:: ops:: Deref for IsaacArray < T > where T : Default + Copy {
41
+ impl < T > :: core:: ops:: Deref for IsaacArray < T > {
42
42
type Target = [ T ; RAND_SIZE ] ;
43
43
#[ inline( always) ]
44
44
fn deref ( & self ) -> & Self :: Target {
45
45
& self . inner
46
46
}
47
47
}
48
48
49
- impl < T > :: core:: ops:: DerefMut for IsaacArray < T > where T : Default + Copy {
49
+ impl < T > :: core:: ops:: DerefMut for IsaacArray < T > {
50
50
#[ inline( always) ]
51
51
fn deref_mut ( & mut self ) -> & mut [ T ; RAND_SIZE ] {
52
52
& mut self . inner
53
53
}
54
54
}
55
55
56
- impl < T > :: core:: default:: Default for IsaacArray < T > where T : Default + Copy {
56
+ impl < T > :: core:: default:: Default for IsaacArray < T > where T : Copy + Default {
57
57
fn default ( ) -> IsaacArray < T > {
58
58
IsaacArray { inner : [ T :: default ( ) ; RAND_SIZE ] }
59
59
}
0 commit comments