Skip to content

Commit ed7f30c

Browse files
Fix a typo and add a typo CI check. (#646)
1 parent 6969045 commit ed7f30c

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ jobs:
125125
- name: check build without crossbeam/default features
126126
run: cargo build -p notify --no-default-features --target ${{ matrix.target }}
127127

128+
# If this fails, consider changing your text or adding something to .typos.toml
129+
typos:
130+
runs-on: ubuntu-latest
131+
steps:
132+
- uses: actions/checkout@v4
133+
134+
- name: check typos
135+
uses: crate-ci/[email protected]
136+
128137
audit:
129138
runs-on: ubuntu-latest
130139

.typos.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See the configuration reference at
2+
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
3+
4+
# Corrections take the form of a key/value pair. The key is the incorrect word
5+
# and the value is the correct word. If the key and value are the same, the
6+
# word is treated as always correct. If the value is an empty string, the word
7+
# is treated as always incorrect.
8+
9+
# Match Identifier - Case Sensitive
10+
[default.extend-identifiers]
11+
ecd686ba = "ecd686ba" # In the CHANGELOG.md
12+
waitres = "waitres"
13+
14+
# Match Inside a Word - Case Insensitive
15+
[default.extend-words]
16+
17+
[files]
18+
# Include .github, .cargo, etc.
19+
ignore-hidden = false
20+
# /.git isn't in .gitignore, because git never tracks it.
21+
# Typos doesn't know that, though.
22+
extend-exclude = ["/.git"]

notify-debouncer-full/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ fn sort_events(events: Vec<DebouncedEvent>) -> Vec<DebouncedEvent> {
731731
let mut push_next = false;
732732

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

0 commit comments

Comments
 (0)