From 3f6db849f7270b9126e6609a87058c1bc3aef1da Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Fri, 30 Aug 2019 14:05:39 -0500 Subject: [PATCH] actually compiles now? --- src/tools/rustbook/src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs index e155f3f7607f..b2111442310e 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::() + .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"))]