diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2018-09-01 17:39:07 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2018-09-01 17:39:07 -0700 |
| commit | 87658bb667be731395b45b89ffad2ceba17d88c4 (patch) | |
| tree | cbfcf80f158e7aaf48d13d0b520ac8ae2483a2f3 | |
| parent | d5b1dee4728e5166d5e4478d27b9c4fb940e3dae (diff) | |
| download | rust-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.rs | 2 |
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]); } } _ => { } |
