@@ -282,7 +282,7 @@ fn print(
282
282
& mut visited_deps,
283
283
& mut levels_continue,
284
284
& mut print_stack,
285
- ) ;
285
+ ) ? ;
286
286
}
287
287
288
288
Ok ( ( ) )
@@ -302,7 +302,7 @@ fn print_node<'a>(
302
302
visited_deps : & mut HashSet < NodeId > ,
303
303
levels_continue : & mut Vec < ( anstyle:: Style , bool ) > ,
304
304
print_stack : & mut Vec < NodeId > ,
305
- ) {
305
+ ) -> CargoResult < ( ) > {
306
306
let new = no_dedupe || visited_deps. insert ( node_index) ;
307
307
308
308
match prefix {
@@ -343,7 +343,7 @@ fn print_node<'a>(
343
343
drop_println ! ( ws. gctx( ) , "{}{}" , format. display( graph, node_index) , star) ;
344
344
345
345
if !new || in_cycle {
346
- return ;
346
+ return Ok ( ( ) ) ;
347
347
}
348
348
print_stack. push ( node_index) ;
349
349
@@ -367,9 +367,11 @@ fn print_node<'a>(
367
367
levels_continue,
368
368
print_stack,
369
369
kind,
370
- ) ;
370
+ ) ? ;
371
371
}
372
372
print_stack. pop ( ) ;
373
+
374
+ Ok ( ( ) )
373
375
}
374
376
375
377
/// Prints all the dependencies of a package for the given dependency kind.
@@ -387,10 +389,10 @@ fn print_dependencies<'a>(
387
389
levels_continue : & mut Vec < ( anstyle:: Style , bool ) > ,
388
390
print_stack : & mut Vec < NodeId > ,
389
391
kind : & EdgeKind ,
390
- ) {
392
+ ) -> CargoResult < ( ) > {
391
393
let deps = graph. edges_of_kind ( node_index, kind) ;
392
394
if deps. is_empty ( ) {
393
- return ;
395
+ return Ok ( ( ) ) ;
394
396
}
395
397
396
398
let name = match kind {
@@ -422,7 +424,7 @@ fn print_dependencies<'a>(
422
424
423
425
// Current level exceeds maximum display depth. Skip.
424
426
if levels_continue. len ( ) + 1 > max_display_depth as usize {
425
- return ;
427
+ return Ok ( ( ) ) ;
426
428
}
427
429
428
430
let mut it = deps
@@ -457,9 +459,11 @@ fn print_dependencies<'a>(
457
459
visited_deps,
458
460
levels_continue,
459
461
print_stack,
460
- ) ;
462
+ ) ? ;
461
463
levels_continue. pop ( ) ;
462
464
}
465
+
466
+ Ok ( ( ) )
463
467
}
464
468
465
469
fn edge_line_color ( kind : EdgeKind ) -> anstyle:: Style {
0 commit comments