Skip to content

Commit 2fa77cb

Browse files
committed
chore: fix typos in comment
1 parent cdb45c8 commit 2fa77cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tools/tidy/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn git_diff<S: AsRef<OsStr>>(base_commit: &str, extra_arg: S) -> Option<Stri
129129

130130
/// Similar to `files_modified`, but only involves a single call to `git`.
131131
///
132-
/// removes all elements from `items` that do not cause any match when `pred` is called with the list of modifed files.
132+
/// removes all elements from `items` that do not cause any match when `pred` is called with the list of modified files.
133133
///
134134
/// if in CI, no elements will be removed.
135135
pub fn files_modified_batch_filter<T>(

src/tools/tidy/src/pal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ fn parse_cfgs(contents: &str) -> Vec<(usize, &str)> {
179179
let contents_after = &contents[*i..];
180180
let first_paren = contents_after.find('(');
181181
let paren_idx = first_paren.map(|ip| i + ip);
182-
let preceeds_whitespace_and_paren = paren_idx
182+
let precedes_whitespace_and_paren = paren_idx
183183
.map(|ip| {
184184
let maybe_space = &contents[*i + "cfg".len()..ip];
185185
maybe_space.chars().all(|c| char::is_whitespace(c) || c == '!')
186186
})
187187
.unwrap_or(false);
188188

189-
succeeds_non_ident && preceeds_whitespace_and_paren
189+
succeeds_non_ident && precedes_whitespace_and_paren
190190
});
191191

192192
cfgs.flat_map(|i| {

0 commit comments

Comments
 (0)