Skip to content

Commit f0e45bf

Browse files
mark-i-mandrehjr
authored andcommitted
fix macos build
1 parent 1de42ff commit f0e45bf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/tools/rustbook/src/main.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use mdbook_1::errors::{Result as Result1};
1212

1313
use mdbook::MDBook;
1414
use mdbook::errors::{Result as Result3};
15+
16+
#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
1517
use mdbook::renderer::RenderContext;
1618

1719
#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
@@ -79,9 +81,12 @@ fn main() {
7981
if let Err(err) = linkcheck(sub_matches) {
8082
eprintln!("Error: {}", err);
8183

82-
if let Ok(broken_links) = err.downcast::<BrokenLinks>() {
83-
for cause in broken_links.links().iter() {
84-
eprintln!("\tCaused By: {}", cause);
84+
#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
85+
{
86+
if let Ok(broken_links) = err.downcast::<BrokenLinks>() {
87+
for cause in broken_links.links().iter() {
88+
eprintln!("\tCaused By: {}", cause);
89+
}
8590
}
8691
}
8792

0 commit comments

Comments
 (0)