@@ -86,10 +86,7 @@ fn test_i8_round_tripping() {
8686 if let Some ( qprev) = prev {
8787 assert ! (
8888 q > qprev,
89- "failed to round-trip {}: {:?} should be greater than {:?}" ,
90- i,
91- q,
92- qprev
89+ "failed to round-trip {i}: {q:?} should be greater than {qprev:?}" ,
9390 ) ;
9491 }
9592 prev = Some ( q) ;
@@ -99,8 +96,8 @@ fn test_i8_round_tripping() {
9996 }
10097 Err ( e) => {
10198 panic ! (
102- "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
103- i, & q, e) ;
99+ "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
100+ i, & q, e) ;
104101 }
105102 }
106103 }
@@ -114,10 +111,7 @@ fn test_i16_round_tripping() {
114111 if let Some ( qprev) = prev {
115112 assert ! (
116113 q > qprev,
117- "failed to round-trip {}: {:?} should be greater than {:?}" ,
118- i,
119- q,
120- qprev
114+ "failed to round-trip {i}: {q:?} should be greater than {qprev:?}" ,
121115 ) ;
122116 }
123117 prev = Some ( q) ;
@@ -127,8 +121,8 @@ fn test_i16_round_tripping() {
127121 }
128122 Err ( e) => {
129123 panic ! (
130- "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
131- i, & q, e) ;
124+ "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
125+ i, & q, e) ;
132126 }
133127 }
134128 }
@@ -142,10 +136,7 @@ fn test_u8_round_tripping() {
142136 if let Some ( qprev) = prev {
143137 assert ! (
144138 q > qprev,
145- "failed to round-trip {}: {:?} should be greater than {:?}" ,
146- i,
147- q,
148- qprev
139+ "failed to round-trip {i}: {q:?} should be greater than {qprev:?}" ,
149140 ) ;
150141 }
151142 prev = Some ( q) ;
@@ -155,8 +146,8 @@ fn test_u8_round_tripping() {
155146 }
156147 Err ( e) => {
157148 panic ! (
158- "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
159- i, & q, e) ;
149+ "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
150+ i, & q, e) ;
160151 }
161152 }
162153 }
@@ -170,10 +161,7 @@ fn test_u16_round_tripping() {
170161 if let Some ( qprev) = prev {
171162 assert ! (
172163 q > qprev,
173- "failed to round-trip {}: {:?} should be greater than {:?}" ,
174- i,
175- q,
176- qprev
164+ "failed to round-trip {i}: {q:?} should be greater than {qprev:?}" ,
177165 ) ;
178166 }
179167 prev = Some ( q) ;
@@ -183,8 +171,8 @@ fn test_u16_round_tripping() {
183171 }
184172 Err ( e) => {
185173 panic ! (
186- "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
187- i, & q, e) ;
174+ "Unexpected overflow when round-tripping {}->{:?}-> [conversion to i8 failed with error {}]" ,
175+ i, & q, e) ;
188176 }
189177 }
190178 }
@@ -322,8 +310,8 @@ fn test_from_signed18bit_to_i16() {
322310
323311#[ test]
324312fn test_from_u16_to_signed18bit ( ) {
325- assert_eq ! ( Signed18Bit :: try_from ( 0_u16 ) , Ok ( Signed18Bit :: ZERO ) ) ;
326- assert_eq ! ( Signed18Bit :: try_from ( 1_u16 ) , Ok ( Signed18Bit :: ONE ) ) ;
313+ assert_eq ! ( Signed18Bit :: from ( 0_u16 ) , Signed18Bit :: ZERO ) ;
314+ assert_eq ! ( Signed18Bit :: from ( 1_u16 ) , Signed18Bit :: ONE ) ;
327315 assert_eq ! ( Signed18Bit :: from( 0o377_u16 ) . bits, 0o000_000_377_u32 ) ;
328316}
329317
0 commit comments