File tree Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,8 @@ mod tests {
283
283
let queue = env. build_queue ( ) ;
284
284
285
285
let test_crates = [
286
- ( "foo" , "1.0.0" , -10 ) ,
287
286
( "bar" , "1.0.0" , 0 ) ,
287
+ ( "foo" , "1.0.0" , -10 ) ,
288
288
( "baz" , "1.0.0" , 10 ) ,
289
289
] ;
290
290
for krate in & test_crates {
@@ -293,26 +293,15 @@ mod tests {
293
293
294
294
assert_eq ! (
295
295
vec![
296
- QueuedCrate {
297
- id: 1 ,
298
- name: "foo" . into( ) ,
299
- version: "1.0.0" . into( ) ,
300
- priority: -10 ,
301
- } ,
302
- QueuedCrate {
303
- id: 2 ,
304
- name: "bar" . into( ) ,
305
- version: "1.0.0" . into( ) ,
306
- priority: 0 ,
307
- } ,
308
- QueuedCrate {
309
- id: 3 ,
310
- name: "baz" . into( ) ,
311
- version: "1.0.0" . into( ) ,
312
- priority: 10 ,
313
- } ,
296
+ ( "foo" , "1.0.0" , -10 ) ,
297
+ ( "bar" , "1.0.0" , 0 ) ,
298
+ ( "baz" , "1.0.0" , 10 ) ,
314
299
] ,
315
- queue. queued_crates( ) ?
300
+ queue
301
+ . queued_crates( ) ?
302
+ . iter( )
303
+ . map( |c| ( c. name. as_str( ) , c. version. as_str( ) , c. priority) )
304
+ . collect:: <Vec <_>>( )
316
305
) ;
317
306
318
307
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments