File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -56,21 +56,22 @@ fn main() {
56
56
eprintln ! ( "Error: {}" , err) ;
57
57
58
58
// HACK: ignore timeouts
59
- #[ allow( unused_mut) ]
60
- let mut actually_broken = false ;
61
-
62
- #[ cfg( feature = "linkcheck" ) ]
63
- {
64
- if let Ok ( broken_links) = err. downcast :: < BrokenLinks > ( ) {
65
- for cause in broken_links. links ( ) . iter ( ) {
66
- eprintln ! ( "\t Caused By: {}" , cause) ;
67
-
68
- if cause. contains ( "timed out" ) {
69
- actually_broken = true ;
70
- }
71
- }
59
+ let actually_broken = {
60
+ #[ cfg( feature = "linkcheck" ) ]
61
+ {
62
+ err. downcast :: < BrokenLinks > ( )
63
+ . unwrap_or ( false )
64
+ . links ( )
65
+ . iter ( )
66
+ . inspect ( |cause| eprintln ! ( "\t Caused By: {}" , cause) )
67
+ . any ( |cause| !cause. contains ( "timed out" ) ) ;
72
68
}
73
- }
69
+
70
+ #[ cfg( not( feature = "linkcheck" ) ) ]
71
+ {
72
+ false
73
+ }
74
+ } ;
74
75
75
76
if actually_broken {
76
77
std:: process:: exit ( 101 ) ;
You can’t perform that action at this time.
0 commit comments