about summary refs log tree commit diff
path: root/src/libstd/collections
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/collections
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/collections')
-rw-r--r--src/libstd/collections/hash/map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 536ce2e16a0..1eea920c623 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -3610,7 +3610,7 @@ mod test_map {
             for i in 1..1001 {
                 assert!(m.insert(i, i).is_none());
 
-                for j in 1..i + 1 {
+                for j in 1..=i {
                     let r = m.get(&j);
                     assert_eq!(r, Some(&j));
                 }
@@ -3629,7 +3629,7 @@ mod test_map {
             for i in 1..1001 {
                 assert!(m.remove(&i).is_some());
 
-                for j in 1..i + 1 {
+                for j in 1..=i {
                     assert!(!m.contains_key(&j));
                 }