From d37821c194a1013611d864a84c6042681e495311 Mon Sep 17 00:00:00 2001 From: Michael Bryan Date: Wed, 4 Oct 2017 19:55:21 +0800 Subject: [PATCH] Rebased after #438 --- src/bin/serve.rs | 2 +- src/bin/watch.rs | 6 +++--- tests/config.rs | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bin/serve.rs b/src/bin/serve.rs index 853fa237..87099411 100644 --- a/src/bin/serve.rs +++ b/src/bin/serve.rs @@ -3,7 +3,7 @@ extern crate staticfile; extern crate ws; use std; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use self::iron::{status, AfterMiddleware, Chain, Iron, IronError, IronResult, Request, Response, Set}; use clap::{App, ArgMatches, SubCommand}; diff --git a/src/bin/watch.rs b/src/bin/watch.rs index 980b2b07..39862d18 100644 --- a/src/bin/watch.rs +++ b/src/bin/watch.rs @@ -75,17 +75,17 @@ where }; // Add the theme directory to the watcher - watcher.watch(book.get_theme_path(), Recursive) + watcher.watch(book.theme_dir(), Recursive) .unwrap_or_default(); // Add the book.{json,toml} file to the watcher if it exists, because it's not // located in the source directory - if watcher.watch(book.get_root().join("book.json"), NonRecursive) + if watcher.watch(book.root.join("book.json"), NonRecursive) .is_err() { // do nothing if book.json is not found } - if watcher.watch(book.get_root().join("book.toml"), NonRecursive) + if watcher.watch(book.root.join("book.toml"), NonRecursive) .is_err() { // do nothing if book.toml is not found diff --git a/tests/config.rs b/tests/config.rs index 7b5b8828..89efe5bd 100644 --- a/tests/config.rs +++ b/tests/config.rs @@ -46,4 +46,3 @@ use tempdir::TempDir; // assert_eq!(book.get_destination(), dir.path().join("baz")); // assert_eq!(book.get_mathjax_support(), true); // } ->>>>>>> Integration tests pass again