]> git.lizzy.rs Git - rust.git/blobdiff - tests/source/spaces-around-ranges.rs
Prevent duplicate comma when formatting struct pattern with ".."
[rust.git] / tests / source / spaces-around-ranges.rs
index 188f8f9074f994a2e2187c0780984254631b409d..1936b5e161f825cc195bf2b223c228e73ab8cc18 100644 (file)
@@ -4,12 +4,12 @@ fn bar(v: &[u8]) {}
 
 fn foo() {
     let a = vec![0; 20];
-    for j in 0...20 {
+    for j in 0..=20 {
         for i in 0..3 {
             bar(a[i..j]);
             bar(a[i..]);
             bar(a[..j]);
-            bar(a[...(j + 1)]);
+            bar(a[..=(j + 1)]);
         }
     }
 }