File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
extern crate mdbook;
3
3
#[ macro_use]
4
4
extern crate clap;
5
- extern crate crossbeam;
6
5
7
6
// Dependencies for the Watch feature
8
7
#[ cfg( feature = "watch" ) ]
9
8
extern crate notify;
10
9
#[ cfg( feature = "watch" ) ]
11
10
extern crate time;
11
+ #[ cfg( feature = "watch" ) ]
12
+ extern crate crossbeam;
12
13
13
14
// Dependencies for the Serve feature
14
15
#[ cfg( feature = "serve" ) ]
@@ -269,6 +270,7 @@ fn get_book_dir(args: &ArgMatches) -> PathBuf {
269
270
270
271
271
272
// Calls the closure when a book source file is changed. This is blocking!
273
+ #[ cfg( feature = "watch" ) ]
272
274
fn trigger_on_change < F > ( book : & mut MDBook , closure : F ) -> ( )
273
275
where F : Fn ( notify:: Event , & mut MDBook ) -> ( )
274
276
{
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ pub struct MDBook {
28
28
pub content : Vec < BookItem > ,
29
29
renderer : Box < Renderer > ,
30
30
31
- #[ cfg( feature = "serve" ) ]
32
31
livereload : Option < String > ,
33
32
}
34
33
@@ -57,6 +56,7 @@ impl MDBook {
57
56
58
57
content : vec ! [ ] ,
59
58
renderer : Box :: new ( HtmlHandlebars :: new ( ) ) ,
59
+
60
60
livereload : None ,
61
61
}
62
62
}
You can’t perform that action at this time.
0 commit comments