about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2019-08-30 14:05:39 -0500
committerMark Mansi <markm@cs.wisc.edu>2019-08-30 14:05:39 -0500
commit3f6db849f7270b9126e6609a87058c1bc3aef1da (patch)
tree4769cf23a92e43808eb7f73ba44b093334c5ad95
parent2e59c4afd16ea7b887f3d81b5aeea8669b843afe (diff)
downloadrust-3f6db849f7270b9126e6609a87058c1bc3aef1da.tar.gz
rust-3f6db849f7270b9126e6609a87058c1bc3aef1da.zip
actually compiles now?
-rw-r--r--src/tools/rustbook/src/main.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs
index e155f3f7607..b2111442310 100644
--- a/src/tools/rustbook/src/main.rs
+++ b/src/tools/rustbook/src/main.rs
@@ -60,11 +60,14 @@ fn main() {
                     #[cfg(feature = "linkcheck")]
                     {
                         err.downcast::<BrokenLinks>()
+                            .map(|broken_links| {
+                                broken_links
+                                    .links()
+                                    .iter()
+                                    .inspect(|cause| eprintln!("\tCaused By: {}", cause))
+                                    .any(|cause| !format!("{}", cause).contains("timed out"))
+                            })
                             .unwrap_or(false)
-                            .links()
-                            .iter()
-                            .inspect(|cause| eprintln!("\tCaused By: {}", cause))
-                            .any(|cause| !cause.contains("timed out"));
                     }
 
                     #[cfg(not(feature = "linkcheck"))]