From 2fa77cb212b101509ec5570fbf039dea6aa728c6 Mon Sep 17 00:00:00 2001 From: Dannyyy93 Date: Thu, 28 Aug 2025 10:36:32 +0800 Subject: [PATCH] chore: fix typos in comment --- src/tools/tidy/src/lib.rs | 2 +- src/tools/tidy/src/pal.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/tidy/src/lib.rs b/src/tools/tidy/src/lib.rs index 37713cbf75e9b..46896380d6b02 100644 --- a/src/tools/tidy/src/lib.rs +++ b/src/tools/tidy/src/lib.rs @@ -129,7 +129,7 @@ pub fn git_diff>(base_commit: &str, extra_arg: S) -> Option( diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs index 5b8b44429bbc0..a66b71287f46f 100644 --- a/src/tools/tidy/src/pal.rs +++ b/src/tools/tidy/src/pal.rs @@ -179,14 +179,14 @@ fn parse_cfgs(contents: &str) -> Vec<(usize, &str)> { let contents_after = &contents[*i..]; let first_paren = contents_after.find('('); let paren_idx = first_paren.map(|ip| i + ip); - let preceeds_whitespace_and_paren = paren_idx + let precedes_whitespace_and_paren = paren_idx .map(|ip| { let maybe_space = &contents[*i + "cfg".len()..ip]; maybe_space.chars().all(|c| char::is_whitespace(c) || c == '!') }) .unwrap_or(false); - succeeds_non_ident && preceeds_whitespace_and_paren + succeeds_non_ident && precedes_whitespace_and_paren }); cfgs.flat_map(|i| {