1
Fork 0

tidy: Use an inclusive range rather than a +1 bound

This improves readability and eliminates a clippy warning.
This commit is contained in:
Josh Triplett 2018-09-01 17:39:07 -07:00
parent d5b1dee472
commit 87658bb667

View file

@ -216,7 +216,7 @@ fn parse_cfgs<'a>(contents: &'a str) -> Vec<(usize, &'a str)> {
b')' => { b')' => {
depth -= 1; depth -= 1;
if depth == 0 { if depth == 0 {
return (i, &contents_from[.. j + 1]); return (i, &contents_from[..=j]);
} }
} }
_ => { } _ => { }