diff --git a/CHANGELOG.md b/CHANGELOG.md index d0035dfb..8a5e4b47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -130,7 +130,7 @@ Newly introduced alternative debouncer with more features. [#480] - FEATURE: only emit a single `rename` event if the rename `From` and `To` events can be matched - FEATURE: merge multiple `rename` events -- FEATURE: keep track of the file system IDs all files and stiches rename events together (FSevents, Windows) +- FEATURE: keep track of the file system IDs all files and stitches rename events together (FSevents, Windows) - FEATURE: emit only one `remove` event when deleting a directory (inotify) - FEATURE: don't emit duplicate create events - FEATURE: don't emit `Modify` events after a `Create` event diff --git a/notify-debouncer-full/README.md b/notify-debouncer-full/README.md index 13b6845f..9f451b54 100644 --- a/notify-debouncer-full/README.md +++ b/notify-debouncer-full/README.md @@ -7,7 +7,7 @@ A debouncer for [notify] that is optimized for ease of use. * Only emits a single `Rename` event if the rename `From` and `To` events can be matched * Merges multiple `Rename` events * Takes `Rename` events into account and updates paths for events that occurred before the rename event, but which haven't been emitted, yet -* Optionally keeps track of the file system IDs all files and stiches rename events together (FSevents, Windows) +* Optionally keeps track of the file system IDs all files and stitches rename events together (FSevents, Windows) * Emits only one `Remove` event when deleting a directory (inotify) * Doesn't emit duplicate create events * Doesn't emit `Modify` events after a `Create` event diff --git a/notify-debouncer-full/src/lib.rs b/notify-debouncer-full/src/lib.rs index d4e4bd98..d3123e71 100644 --- a/notify-debouncer-full/src/lib.rs +++ b/notify-debouncer-full/src/lib.rs @@ -3,7 +3,7 @@ //! * Only emits a single `Rename` event if the rename `From` and `To` events can be matched //! * Merges multiple `Rename` events //! * Takes `Rename` events into account and updates paths for events that occurred before the rename event, but which haven't been emitted, yet -//! * Optionally keeps track of the file system IDs all files and stiches rename events together (FSevents, Windows) +//! * Optionally keeps track of the file system IDs all files and stitches rename events together (FSevents, Windows) //! * Emits only one `Remove` event when deleting a directory (inotify) //! * Doesn't emit duplicate create events //! * Doesn't emit `Modify` events after a `Create` event diff --git a/notify-debouncer-mini/src/lib.rs b/notify-debouncer-mini/src/lib.rs index 1d76cbe9..bbbf6c5a 100644 --- a/notify-debouncer-mini/src/lib.rs +++ b/notify-debouncer-mini/src/lib.rs @@ -131,7 +131,7 @@ impl Config { } /// Set batch mode /// - /// When `batch_mode` is enabled, events may be delayed (at most 2x the specified timout) and delivered with others. + /// When `batch_mode` is enabled, events may be delayed (at most 2x the specified timeout) and delivered with others. /// If disabled, all events are delivered immediately when their debounce timeout is reached. pub fn with_batch_mode(mut self, batch_mode: bool) -> Self { self.batch_mode = batch_mode; @@ -248,7 +248,7 @@ impl DebounceDataInner { data_back.insert(path.clone(), event); events_expired.push(DebouncedEvent::new(path, DebouncedEventKind::AnyContinuous)); } else { - // event is neither old enough for continous event, nor is it expired for an Any event + // event is neither old enough for continuous event, nor is it expired for an Any event Self::check_deadline( self.batch_mode, self.timeout, @@ -276,7 +276,7 @@ impl DebounceDataInner { match debounce_deadline { Some(current_deadline) => { // shorten deadline to not delay the event - // with batch mode simply wait for the incoming deadline and delay the event untill then + // with batch mode simply wait for the incoming deadline and delay the event until then if !batch_mode && *current_deadline > deadline_candidate { *debounce_deadline = Some(deadline_candidate); } diff --git a/notify/src/fsevent.rs b/notify/src/fsevent.rs index 56bdcd9d..e11e9624 100644 --- a/notify/src/fsevent.rs +++ b/notify/src/fsevent.rs @@ -391,7 +391,7 @@ impl FsEventWatcher { // We need to associate the stream context with our callback in order to propagate events // to the rest of the system. This will be owned by the stream, and will be freed when the - // stream is closed. This means we will leak the context if we panic before reacing + // stream is closed. This means we will leak the context if we panic before reaching // `FSEventStreamRelease`. let context = Box::into_raw(Box::new(StreamContextInfo { event_handler: self.event_handler.clone(), diff --git a/notify/src/kqueue.rs b/notify/src/kqueue.rs index 5869b071..0ea8339b 100644 --- a/notify/src/kqueue.rs +++ b/notify/src/kqueue.rs @@ -153,8 +153,8 @@ impl EventLoop { let path = PathBuf::from(path); let event = match data { /* - TODO: Differenciate folders and files - kqueue dosen't tell us if this was a file or a dir, so we + TODO: Differentiate folders and files + kqueue doesn't tell us if this was a file or a dir, so we could only emulate this inotify behavior if we keep track of all files and directories internally and then perform a lookup. @@ -206,7 +206,7 @@ impl EventLoop { /* Extend and Truncate are just different names for the same - operation, extend is only used on FreeBSD, truncate everwhere + operation, extend is only used on FreeBSD, truncate everywhere else */ kqueue::Vnode::Extend | kqueue::Vnode::Truncate => Ok(Event::new( @@ -231,13 +231,13 @@ impl EventLoop { delete. */ kqueue::Vnode::Link => { - // As we currently don't have a solution that whould allow us + // As we currently don't have a solution that would allow us // to only add/remove the new/delete directory and that dosn't include a // possible race condition. On possible solution would be to // create a `HashMap>` which would // include every directory and this content add the time of - // adding it to kqueue. While this sould allow us to do the - // diff and only add/remove the files nessesary. This whould + // adding it to kqueue. While this should allow us to do the + // diff and only add/remove the files necessary. This would // also introduce a race condition, where multiple files could // all ready be remove from the directory, and we could get out // of sync. @@ -250,7 +250,7 @@ impl EventLoop { Ok(Event::new(EventKind::Modify(ModifyKind::Any)).add_path(path)) } - // Kqueue not provide us with the infomation nessesary to provide + // Kqueue not provide us with the information necessary to provide // the new file name to the event. kqueue::Vnode::Rename => { remove_watches.push(path.clone());