Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored and 0xpr03 committed Jun 26, 2024
1 parent 39e8d1b commit ade84e8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion notify-debouncer-full/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion notify-debouncer-full/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions notify-debouncer-mini/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion notify/src/fsevent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
14 changes: 7 additions & 7 deletions notify/src/kqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand All @@ -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<PathBuf, Vec<PathBuf>>` 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.
Expand All @@ -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());
Expand Down

0 comments on commit ade84e8

Please sign in to comment.