Skip to content

Commit

Permalink
Fix a typo and add a typo CI check. (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Oct 23, 2024
1 parent 6969045 commit ed7f30c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ jobs:
- name: check build without crossbeam/default features
run: cargo build -p notify --no-default-features --target ${{ matrix.target }}

# If this fails, consider changing your text or adding something to .typos.toml
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: check typos
uses: crate-ci/[email protected]

audit:
runs-on: ubuntu-latest

Expand Down
22 changes: 22 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See the configuration reference at
# https://github.com/crate-ci/typos/blob/master/docs/reference.md

# Corrections take the form of a key/value pair. The key is the incorrect word
# and the value is the correct word. If the key and value are the same, the
# word is treated as always correct. If the value is an empty string, the word
# is treated as always incorrect.

# Match Identifier - Case Sensitive
[default.extend-identifiers]
ecd686ba = "ecd686ba" # In the CHANGELOG.md
waitres = "waitres"

# Match Inside a Word - Case Insensitive
[default.extend-words]

[files]
# Include .github, .cargo, etc.
ignore-hidden = false
# /.git isn't in .gitignore, because git never tracks it.
# Typos doesn't know that, though.
extend-exclude = ["/.git"]
2 changes: 1 addition & 1 deletion notify-debouncer-full/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ fn sort_events(events: Vec<DebouncedEvent>) -> Vec<DebouncedEvent> {
let mut push_next = false;

while events.front().is_some_and(|event| event.time <= min_time) {
// unwrap is safe beause `pop_front` mus return some in order to enter the loop
// unwrap is safe because `pop_front` mus return some in order to enter the loop
let event = events.pop_front().unwrap();
sorted.push(event);
push_next = true;
Expand Down

0 comments on commit ed7f30c

Please sign in to comment.