about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2018-09-01 17:39:07 -0700
committerJosh Triplett <josh@joshtriplett.org>2018-09-01 17:39:07 -0700
commit87658bb667be731395b45b89ffad2ceba17d88c4 (patch)
treecbfcf80f158e7aaf48d13d0b520ac8ae2483a2f3
parentd5b1dee4728e5166d5e4478d27b9c4fb940e3dae (diff)
downloadrust-87658bb667be731395b45b89ffad2ceba17d88c4.tar.gz
rust-87658bb667be731395b45b89ffad2ceba17d88c4.zip
tidy: Use an inclusive range rather than a +1 bound
This improves readability and eliminates a clippy warning.
-rw-r--r--src/tools/tidy/src/pal.rs2
1 files changed, 1 insertions, 1 deletions
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]);
                     }
                 }
                 _ => { }