mirror of
https://github.com/rust-lang/mdBook
synced 2024-11-15 01:07:13 +00:00
Merge pull request #137 from Bobo1239/fix-no-default-features
Fix no-default-features build, fixes #136
This commit is contained in:
commit
f9aa9a6843
2 changed files with 4 additions and 2 deletions
|
@ -2,13 +2,14 @@
|
|||
extern crate mdbook;
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
extern crate crossbeam;
|
||||
|
||||
// Dependencies for the Watch feature
|
||||
#[cfg(feature = "watch")]
|
||||
extern crate notify;
|
||||
#[cfg(feature = "watch")]
|
||||
extern crate time;
|
||||
#[cfg(feature = "watch")]
|
||||
extern crate crossbeam;
|
||||
|
||||
// Dependencies for the Serve feature
|
||||
#[cfg(feature = "serve")]
|
||||
|
@ -269,6 +270,7 @@ fn get_book_dir(args: &ArgMatches) -> PathBuf {
|
|||
|
||||
|
||||
// Calls the closure when a book source file is changed. This is blocking!
|
||||
#[cfg(feature = "watch")]
|
||||
fn trigger_on_change<F>(book: &mut MDBook, closure: F) -> ()
|
||||
where F: Fn(notify::Event, &mut MDBook) -> ()
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ pub struct MDBook {
|
|||
pub content: Vec<BookItem>,
|
||||
renderer: Box<Renderer>,
|
||||
|
||||
#[cfg(feature = "serve")]
|
||||
livereload: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -57,6 +56,7 @@ impl MDBook {
|
|||
|
||||
content: vec![],
|
||||
renderer: Box::new(HtmlHandlebars::new()),
|
||||
|
||||
livereload: None,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue