@@ -11,19 +11,27 @@ macro_rules! i {
11
11
( $array: expr, $index: expr) => {
12
12
unsafe { * $array. get_unchecked( $index) }
13
13
} ;
14
- ( $array: expr, $index: expr, =, $rhs: expr) => {
15
- unsafe { * $array. get_unchecked_mut( $index) = $rhs; }
14
+ ( $array: expr, $index: expr, = , $rhs: expr) => {
15
+ unsafe {
16
+ * $array. get_unchecked_mut( $index) = $rhs;
17
+ }
16
18
} ;
17
- ( $array: expr, $index: expr, +=, $rhs: expr) => {
18
- unsafe { * $array. get_unchecked_mut( $index) += $rhs; }
19
+ ( $array: expr, $index: expr, += , $rhs: expr) => {
20
+ unsafe {
21
+ * $array. get_unchecked_mut( $index) += $rhs;
22
+ }
19
23
} ;
20
- ( $array: expr, $index: expr, -=, $rhs: expr) => {
21
- unsafe { * $array. get_unchecked_mut( $index) -= $rhs; }
24
+ ( $array: expr, $index: expr, -= , $rhs: expr) => {
25
+ unsafe {
26
+ * $array. get_unchecked_mut( $index) -= $rhs;
27
+ }
22
28
} ;
23
- ( $array: expr, $index: expr, &=, $rhs: expr) => {
24
- unsafe { * $array. get_unchecked_mut( $index) &= $rhs; }
29
+ ( $array: expr, $index: expr, &= , $rhs: expr) => {
30
+ unsafe {
31
+ * $array. get_unchecked_mut( $index) &= $rhs;
32
+ }
25
33
} ;
26
- ( $array: expr, $index: expr, ==, $rhs: expr) => {
34
+ ( $array: expr, $index: expr, == , $rhs: expr) => {
27
35
unsafe { * $array. get_unchecked_mut( $index) == $rhs }
28
36
} ;
29
37
}
@@ -33,19 +41,19 @@ macro_rules! i {
33
41
( $array: expr, $index: expr) => {
34
42
* $array. get( $index) . unwrap( )
35
43
} ;
36
- ( $array: expr, $index: expr, =, $rhs: expr) => {
44
+ ( $array: expr, $index: expr, = , $rhs: expr) => {
37
45
* $array. get_mut( $index) . unwrap( ) = $rhs;
38
46
} ;
39
- ( $array: expr, $index: expr, -=, $rhs: expr) => {
47
+ ( $array: expr, $index: expr, -= , $rhs: expr) => {
40
48
* $array. get_mut( $index) . unwrap( ) -= $rhs;
41
49
} ;
42
- ( $array: expr, $index: expr, +=, $rhs: expr) => {
50
+ ( $array: expr, $index: expr, += , $rhs: expr) => {
43
51
* $array. get_mut( $index) . unwrap( ) += $rhs;
44
52
} ;
45
- ( $array: expr, $index: expr, &=, $rhs: expr) => {
53
+ ( $array: expr, $index: expr, &= , $rhs: expr) => {
46
54
* $array. get_mut( $index) . unwrap( ) &= $rhs;
47
55
} ;
48
- ( $array: expr, $index: expr, ==, $rhs: expr) => {
56
+ ( $array: expr, $index: expr, == , $rhs: expr) => {
49
57
* $array. get_mut( $index) . unwrap( ) == $rhs
50
58
} ;
51
59
}
0 commit comments