From a504c0c605065f68a4d9b6cab4a475d7a1f99f39 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 6 Oct 2023 17:29:21 +1100 Subject: [PATCH] Make `tidy-alphabetical-{start,end}` work more widely. Don't restrict it to lines that have `//` in them. This means it can be used in `Cargo.toml` files, for example. --- src/tools/tidy/src/alphabetical.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/tidy/src/alphabetical.rs b/src/tools/tidy/src/alphabetical.rs index fdc411c8925..3e60915c224 100644 --- a/src/tools/tidy/src/alphabetical.rs +++ b/src/tools/tidy/src/alphabetical.rs @@ -30,8 +30,8 @@ fn is_close_bracket(c: char) -> bool { } // Don't let tidy check this here :D -const START_COMMENT: &str = concat!("// tidy-alphabetical", "-start"); -const END_COMMENT: &str = "// tidy-alphabetical-end"; +const START_COMMENT: &str = concat!("tidy-alphabetical", "-start"); +const END_COMMENT: &str = "tidy-alphabetical-end"; fn check_section<'a>( file: impl Display,