Skip to content

Commit

Permalink
kqueue: fix build on FreeBSD
Browse files Browse the repository at this point in the history
The kqueue crate supports platform-specific events, so the build was failing on FreeBSD with:
error[E0004]: non-exhaustive patterns: `Open`, `CloseWrite` and `Close` not covered
  • Loading branch information
valpackett authored and 0xpr03 committed Apr 16, 2022
1 parent baafb16 commit 41a74f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ impl EventLoop {
remove_watches.push(path.clone());
Ok(Event::new(EventKind::Remove(RemoveKind::Any)).add_path(path))
}

// On different BSD variants, different extra events may be present
#[allow(unreachable_patterns)]
_ => Ok(Event::new(EventKind::Other)),
};
self.event_handler.handle_event(event);
}
Expand Down

0 comments on commit 41a74f0

Please sign in to comment.