From 87658bb667be731395b45b89ffad2ceba17d88c4 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 1 Sep 2018 17:39:07 -0700 Subject: [PATCH] tidy: Use an inclusive range rather than a +1 bound This improves readability and eliminates a clippy warning. --- src/tools/tidy/src/pal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs index a7abaf7a5b8..69a4c09c228 100644 --- a/src/tools/tidy/src/pal.rs +++ b/src/tools/tidy/src/pal.rs @@ -216,7 +216,7 @@ fn parse_cfgs<'a>(contents: &'a str) -> Vec<(usize, &'a str)> { b')' => { depth -= 1; if depth == 0 { - return (i, &contents_from[.. j + 1]); + return (i, &contents_from[..=j]); } } _ => { }