@@ -160,7 +160,7 @@ mod tests {
160
160
161
161
#[ test]
162
162
fn parses_dependencies ( ) {
163
- for ( input, expected_path, expected_tag, expected_alias) in [
163
+ for ( input, expected_path, expected_tag, expected_alias) in & [
164
164
( "gakonst/lootloose" , "https://github.com/gakonst/lootloose" , None , None ) ,
165
165
( "github.com/gakonst/lootloose" , "https://github.com/gakonst/lootloose" , None , None ) ,
166
166
(
@@ -242,8 +242,7 @@ mod tests {
242
242
Some ( "v1" ) ,
243
243
Some ( "loot" ) ,
244
244
) ,
245
- ]
246
- . iter ( ) {
245
+ ] {
247
246
let dep = Dependency :: from_str ( input) . unwrap ( ) ;
248
247
assert_eq ! ( dep. url, Some ( expected_path. to_string( ) ) ) ;
249
248
assert_eq ! ( dep. tag, expected_tag. map( ToString :: to_string) ) ;
@@ -269,15 +268,14 @@ mod tests {
269
268
270
269
#[ test]
271
270
fn parses_contract_info ( ) {
272
- for ( input, expected_path, expected_name) in [
271
+ for ( input, expected_path, expected_name) in & [
273
272
(
274
273
"src/contracts/Contracts.sol:Contract" ,
275
274
Some ( "src/contracts/Contracts.sol" ) ,
276
275
"Contract" ,
277
276
) ,
278
277
( "Contract" , None , "Contract" ) ,
279
- ]
280
- . iter ( ) {
278
+ ] {
281
279
let contract = ContractInfo :: from_str ( input) . unwrap ( ) ;
282
280
assert_eq ! ( contract. path, expected_path. map( ToString :: to_string) ) ;
283
281
assert_eq ! ( contract. name, expected_name. to_string( ) ) ;
@@ -286,7 +284,7 @@ mod tests {
286
284
287
285
#[ test]
288
286
fn contract_info_should_reject_without_name ( ) {
289
- for input in [ "src/contracts/" , "src/contracts/Contracts.sol" ] . iter ( ) {
287
+ for input in & [ "src/contracts/" , "src/contracts/Contracts.sol" ] {
290
288
let contract = ContractInfo :: from_str ( input) ;
291
289
assert ! ( contract. is_err( ) )
292
290
}
0 commit comments