Cfg off remaining items for a clean win/mac build

Closes #98
This commit is contained in:
Félix Saparelli 2018-10-05 20:56:06 +13:00
parent cee1712c4f
commit f6b16813aa
2 changed files with 5 additions and 2 deletions

View File

@ -12,7 +12,7 @@ pub enum Error {
}
impl StdError for Error {
fn description (&self) -> &str {
fn description(&self) -> &str {
// This method is soft-deprecated and shouldn't be used,
// see Display for the actual description.
"a watchexec error"

View File

@ -11,6 +11,7 @@ use error::{Error, Result};
use gitignore;
use log;
use notification_filter::NotificationFilter;
#[cfg(target_os = "linux")]
use notify;
use pathop::PathOp;
use process::{self, Process};
@ -61,7 +62,9 @@ pub fn run(args: cli::Args) -> Result<()> {
let filter = NotificationFilter::new(args.filters, args.ignores, gitignore)?;
let (tx, rx) = channel();
let (poll, poll_interval) = (args.poll, args.poll_interval).clone();
let poll = args.poll.clone();
#[cfg(target_os = "linux")]
let poll_interval = args.poll_interval.clone();
let watcher = Watcher::new(tx.clone(), &paths, args.poll, args.poll_interval).or_else(|err| {
if poll {
return Err(err);