about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-07 12:42:32 +0800
committerGitHub <noreply@github.com>2018-12-07 12:42:32 +0800
commit0e41ef13aac432d7c33f9e1287270769deb69c3f (patch)
tree4bf4ba43ba7add944b6e078511960fbf1876dc9c /src/libstd/sys
parent6a07f23c78dde6368e4566218aef4c38d9d64ec6 (diff)
parentc025d6140999e07ddf0294f0676c64ff2322a210 (diff)
downloadrust-0e41ef13aac432d7c33f9e1287270769deb69c3f.tar.gz
rust-0e41ef13aac432d7c33f9e1287270769deb69c3f.zip
Rollup merge of #56516 - frewsxcv:frewsxcv-eq, r=Mark-Simulacrum
Replace usages of `..i + 1` ranges with `..=i`.

Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/windows/process.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index ff1ee0d26fe..03c1bb54af8 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -487,7 +487,7 @@ fn make_command_line(prog: &OsStr, args: &[OsString]) -> io::Result<Vec<u16>> {
             } else {
                 if x == '"' as u16 {
                     // Add n+1 backslashes to total 2n+1 before internal '"'.
-                    cmd.extend((0..(backslashes + 1)).map(|_| '\\' as u16));
+                    cmd.extend((0..=backslashes).map(|_| '\\' as u16));
                 }
                 backslashes = 0;
             }