Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn handle(rx: Receiver<DebouncedEvent>) {
- loop {
- match rx.recv() {
- Ok(event) => {
- match event {
- DebouncedEvent::Create(file) => created(file),
- DebouncedEvent::Write(file) => created(file),
- DebouncedEvent::Remove(file) => removed(file),
- DebouncedEvent::Rename(from, to) => renamed(from, to),
- DebouncedEvent::Chmod(file) => created(file),
- _ => continue
- };
- },
- Err(e) => {
- println!("There was an error in rx.recv(): {}", e);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement