File tree 2 files changed +18
-18
lines changed
2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,6 @@ macro_rules! impl_array_newtype {
45
45
}
46
46
}
47
47
48
- impl AsRef <[ $ty; $len] > for $thing {
49
- #[ inline]
50
- /// Gets a reference to the underlying array
51
- fn as_ref( & self ) -> & [ $ty; $len] {
52
- let & $thing( ref dat) = self ;
53
- dat
54
- }
55
- }
56
-
57
48
// We cannot derive these traits because Rust 1.41.1 requires `std::array::LengthAtMost32`.
58
49
59
50
#[ cfg( fuzzing) ]
@@ -90,6 +81,15 @@ macro_rules! impl_array_newtype {
90
81
}
91
82
}
92
83
84
+ impl AsRef <[ $ty; $len] > for $thing {
85
+ #[ inline]
86
+ /// Gets a reference to the underlying array
87
+ fn as_ref( & self ) -> & [ $ty; $len] {
88
+ let & $thing( ref dat) = self ;
89
+ dat
90
+ }
91
+ }
92
+
93
93
impl <I > core:: ops:: Index <I > for $thing
94
94
where
95
95
[ $ty] : core:: ops:: Index <I >,
Original file line number Diff line number Diff line change 18
18
macro_rules! impl_array_newtype {
19
19
( $thing: ident, $ty: ty, $len: expr) => {
20
20
21
- impl AsRef <[ $ty; $len] > for $thing {
22
- #[ inline]
23
- /// Gets a reference to the underlying array
24
- fn as_ref( & self ) -> & [ $ty; $len] {
25
- let & $thing( ref dat) = self ;
26
- dat
27
- }
28
- }
29
-
30
21
// We cannot derive these traits because Rust 1.41.1 requires `std::array::LengthAtMost32`.
31
22
32
23
impl PartialEq for $thing {
@@ -58,6 +49,15 @@ macro_rules! impl_array_newtype {
58
49
}
59
50
}
60
51
52
+ impl AsRef <[ $ty; $len] > for $thing {
53
+ #[ inline]
54
+ /// Gets a reference to the underlying array
55
+ fn as_ref( & self ) -> & [ $ty; $len] {
56
+ let & $thing( ref dat) = self ;
57
+ dat
58
+ }
59
+ }
60
+
61
61
impl <I > core:: ops:: Index <I > for $thing
62
62
where
63
63
[ $ty] : core:: ops:: Index <I >,
You can’t perform that action at this time.
0 commit comments