@@ -1178,7 +1178,7 @@ mod tests {
1178
1178
] ;
1179
1179
1180
1180
for test in roundtrip_tests {
1181
- println ! ( "{}" , test ) ;
1181
+ println ! ( "{test}" ) ;
1182
1182
let p: Path = test. parse ( ) . unwrap ( ) ;
1183
1183
assert_eq ! ( p. to_string( ) , test) ;
1184
1184
}
@@ -1188,7 +1188,7 @@ mod tests {
1188
1188
"/ipfs/bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy" ,
1189
1189
) ] ;
1190
1190
for ( test_in, test_out) in valid_tests {
1191
- println ! ( "{}" , test_in ) ;
1191
+ println ! ( "{test_in}" ) ;
1192
1192
let p: Path = test_in. parse ( ) . unwrap ( ) ;
1193
1193
assert_eq ! ( p. to_string( ) , test_out) ;
1194
1194
}
@@ -1200,7 +1200,7 @@ mod tests {
1200
1200
"/ipfs/ipfs.io" ,
1201
1201
] ;
1202
1202
for test in invalid_tests {
1203
- println ! ( "{}" , test ) ;
1203
+ println ! ( "{test}" ) ;
1204
1204
assert ! ( test. parse:: <Path >( ) . is_err( ) ) ;
1205
1205
}
1206
1206
}
@@ -1452,7 +1452,7 @@ mod tests {
1452
1452
"hello\n "
1453
1453
) ;
1454
1454
} else {
1455
- panic ! ( "invalid result: {:?}" , ipld_hello_txt ) ;
1455
+ panic ! ( "invalid result: {ipld_hello_txt :?}" ) ;
1456
1456
}
1457
1457
}
1458
1458
@@ -1488,7 +1488,7 @@ mod tests {
1488
1488
"hello\n "
1489
1489
) ;
1490
1490
} else {
1491
- panic ! ( "invalid result: {:?}" , ipld_hello_txt ) ;
1491
+ panic ! ( "invalid result: {ipld_hello_txt :?}" ) ;
1492
1492
}
1493
1493
}
1494
1494
@@ -1551,7 +1551,7 @@ mod tests {
1551
1551
"world\n "
1552
1552
) ;
1553
1553
} else {
1554
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
1554
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
1555
1555
}
1556
1556
}
1557
1557
}
@@ -1609,7 +1609,7 @@ mod tests {
1609
1609
let cr = seek_and_clip ( ctx. clone ( ) , & node, resolver. clone ( ) , 1 ..3 ) . await ;
1610
1610
assert_eq ! ( read_to_string( cr) . await , "el" ) ;
1611
1611
} else {
1612
- panic ! ( "invalid result: {:?}" , ipld_hello_txt ) ;
1612
+ panic ! ( "invalid result: {ipld_hello_txt :?}" ) ;
1613
1613
}
1614
1614
}
1615
1615
@@ -1676,7 +1676,7 @@ mod tests {
1676
1676
assert ! ( content. starts_with( "2.0</a>" ) ) ;
1677
1677
assert ! ( content. ends_with( "the Apac" ) ) ;
1678
1678
} else {
1679
- panic ! ( "invalid result: {:?}" , ipld_readme ) ;
1679
+ panic ! ( "invalid result: {ipld_readme :?}" ) ;
1680
1680
}
1681
1681
}
1682
1682
}
@@ -1845,7 +1845,7 @@ mod tests {
1845
1845
"hello\n "
1846
1846
) ;
1847
1847
} else {
1848
- panic ! ( "invalid result: {:?}" , ipld_hello_txt ) ;
1848
+ panic ! ( "invalid result: {ipld_hello_txt :?}" ) ;
1849
1849
}
1850
1850
}
1851
1851
@@ -1888,7 +1888,7 @@ mod tests {
1888
1888
"world\n "
1889
1889
) ;
1890
1890
} else {
1891
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
1891
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
1892
1892
}
1893
1893
}
1894
1894
}
@@ -1952,12 +1952,12 @@ mod tests {
1952
1952
. unwrap ( ) ,
1953
1953
)
1954
1954
. await ;
1955
- print ! ( "{}" , content ) ;
1955
+ print ! ( "{content}" ) ;
1956
1956
assert_eq ! ( content. len( ) , 426 ) ;
1957
1957
assert ! ( content. starts_with( "# iroh" ) ) ;
1958
1958
assert ! ( content. ends_with( "</sub>\n \n " ) ) ;
1959
1959
} else {
1960
- panic ! ( "invalid result: {:?}" , ipld_readme ) ;
1960
+ panic ! ( "invalid result: {ipld_readme :?}" ) ;
1961
1961
}
1962
1962
}
1963
1963
}
@@ -2123,7 +2123,7 @@ mod tests {
2123
2123
"hello\n "
2124
2124
) ;
2125
2125
} else {
2126
- panic ! ( "invalid result: {:?}" , ipld_hello_txt ) ;
2126
+ panic ! ( "invalid result: {ipld_hello_txt :?}" ) ;
2127
2127
}
2128
2128
}
2129
2129
@@ -2180,7 +2180,7 @@ mod tests {
2180
2180
"world\n "
2181
2181
) ;
2182
2182
} else {
2183
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
2183
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
2184
2184
}
2185
2185
}
2186
2186
@@ -2218,7 +2218,7 @@ mod tests {
2218
2218
"./bar.txt"
2219
2219
) ;
2220
2220
} else {
2221
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
2221
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
2222
2222
}
2223
2223
}
2224
2224
@@ -2256,7 +2256,7 @@ mod tests {
2256
2256
"../../hello.txt"
2257
2257
) ;
2258
2258
} else {
2259
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
2259
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
2260
2260
}
2261
2261
}
2262
2262
@@ -2294,7 +2294,7 @@ mod tests {
2294
2294
"../hello.txt"
2295
2295
) ;
2296
2296
} else {
2297
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
2297
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
2298
2298
}
2299
2299
2300
2300
let path = format ! ( "/ipfs/{my_symlink_cid_str}" ) ;
@@ -2322,7 +2322,7 @@ mod tests {
2322
2322
"../hello.txt"
2323
2323
) ;
2324
2324
} else {
2325
- panic ! ( "invalid result: {:?}" , ipld_bar_txt ) ;
2325
+ panic ! ( "invalid result: {ipld_bar_txt :?}" ) ;
2326
2326
}
2327
2327
}
2328
2328
}
@@ -2388,7 +2388,7 @@ mod tests {
2388
2388
"world\n " ,
2389
2389
) ;
2390
2390
} else {
2391
- panic ! ( "invalid result: {:?}" , ipld_txt ) ;
2391
+ panic ! ( "invalid result: {ipld_txt :?}" ) ;
2392
2392
}
2393
2393
}
2394
2394
// read the directory listing
@@ -2429,7 +2429,7 @@ mod tests {
2429
2429
2430
2430
for i in 1 ..=10000 {
2431
2431
tokio:: task:: yield_now ( ) . await ; // yield so sessions can be closed
2432
- let path = format ! ( "/ipfs/{root_cid_str}/{}.txt" , i ) ;
2432
+ let path = format ! ( "/ipfs/{root_cid_str}/{i }.txt" ) ;
2433
2433
let ipld_txt = resolver. resolve ( path. parse ( ) . unwrap ( ) ) . await . unwrap ( ) ;
2434
2434
2435
2435
assert ! ( ipld_txt
@@ -2456,10 +2456,10 @@ mod tests {
2456
2456
. unwrap( )
2457
2457
)
2458
2458
. await ,
2459
- format!( "{}\n " , i ) ,
2459
+ format!( "{i }\n " ) ,
2460
2460
) ;
2461
2461
} else {
2462
- panic ! ( "invalid result: {:?}" , ipld_txt ) ;
2462
+ panic ! ( "invalid result: {ipld_txt :?}" ) ;
2463
2463
}
2464
2464
}
2465
2465
}
0 commit comments