Skip to content

Commit

Permalink
Fix compiling on linux and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt authored and 0xpr03 committed Jun 10, 2021
1 parent c25db05 commit 5236978
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ fn filter_dir(e: walkdir::Result<walkdir::DirEntry>) -> Option<walkdir::DirEntry
impl INotifyWatcher {
/// Create a new watcher.
pub fn new<F: EventFn>(event_fn: F) -> Result<Self> {
Self::from_event_fn(Box::new(event_fn)))
Self::from_event_fn(Box::new(event_fn))
}

fn from_event_fn(event_fn: Box<dyn EventFn>) -> Result<Self> {
Expand Down
8 changes: 4 additions & 4 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,12 @@ impl ReadDirectoryChangesWatcher {
}

impl Watcher for ReadDirectoryChangesWatcher {
fn watch<P: AsRef<Path>>(&mut self, path: P, recursive_mode: RecursiveMode) -> Result<()> {
self.watch_inner(path.as_ref(), recursive_mode)
fn watch(&mut self, path: &Path, recursive_mode: RecursiveMode) -> Result<()> {
self.watch_inner(path, recursive_mode)
}

fn unwatch<P: AsRef<Path>>(&mut self, path: P) -> Result<()> {
self.unwatch_inner(path.as_ref())
fn unwatch(&mut self, path: &Path) -> Result<()> {
self.unwatch_inner(path)
}

fn configure(&mut self, config: Config) -> Result<bool> {
Expand Down

0 comments on commit 5236978

Please sign in to comment.