Skip to content

Commit f9aa9a6

Browse files
committed
Merge pull request #137 from Bobo1239/fix-no-default-features
Fix no-default-features build, fixes #136
2 parents cfcf6d9 + 9b1e224 commit f9aa9a6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: src/bin/mdbook.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
extern crate mdbook;
33
#[macro_use]
44
extern crate clap;
5-
extern crate crossbeam;
65

76
// Dependencies for the Watch feature
87
#[cfg(feature = "watch")]
98
extern crate notify;
109
#[cfg(feature = "watch")]
1110
extern crate time;
11+
#[cfg(feature = "watch")]
12+
extern crate crossbeam;
1213

1314
// Dependencies for the Serve feature
1415
#[cfg(feature = "serve")]
@@ -269,6 +270,7 @@ fn get_book_dir(args: &ArgMatches) -> PathBuf {
269270

270271

271272
// Calls the closure when a book source file is changed. This is blocking!
273+
#[cfg(feature = "watch")]
272274
fn trigger_on_change<F>(book: &mut MDBook, closure: F) -> ()
273275
where F: Fn(notify::Event, &mut MDBook) -> ()
274276
{

Diff for: src/book/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub struct MDBook {
2828
pub content: Vec<BookItem>,
2929
renderer: Box<Renderer>,
3030

31-
#[cfg(feature = "serve")]
3231
livereload: Option<String>,
3332
}
3433

@@ -57,6 +56,7 @@ impl MDBook {
5756

5857
content: vec![],
5958
renderer: Box::new(HtmlHandlebars::new()),
59+
6060
livereload: None,
6161
}
6262
}

0 commit comments

Comments
 (0)