Skip to content

Commit

Permalink
(fix) fixed warnings and errors in watch
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Dec 6, 2015
1 parent efe8588 commit 40b2ae2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/watch_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ use hbs::{Template, HandlebarsEngine, DirectorySource};
#[cfg(feature = "watch")]
use hbs::Watchable;
use rustc_serialize::json::{ToJson, Json};

use std::collections::BTreeMap;
use std::sync::Arc;
use std::error::Error;


struct Team {
Expand Down
4 changes: 3 additions & 1 deletion src/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ impl Watchable for Arc<HandlebarsEngine> {
match _watch(&path) {
Ok(_) => {
info!("Template directory changed");
hbs.reload();
if let Err(e) = hbs.reload() {
error!("Failed to reload directory: {:?}", e);
}
},
Err(e) => {
warn!("Failed to watch directory: {:?}", e);
Expand Down

0 comments on commit 40b2ae2

Please sign in to comment.