about summary refs log tree commit diff
path: root/tests/codegen/slice-windows-no-bounds-check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/slice-windows-no-bounds-check.rs')
-rw-r--r--tests/codegen/slice-windows-no-bounds-check.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/codegen/slice-windows-no-bounds-check.rs b/tests/codegen/slice-windows-no-bounds-check.rs
index 188011ebe7f..db3211c8def 100644
--- a/tests/codegen/slice-windows-no-bounds-check.rs
+++ b/tests/codegen/slice-windows-no-bounds-check.rs
@@ -12,10 +12,7 @@ pub fn naive_string_search(haystack: &str, needle: &str) -> Option<usize> {
     }
     // CHECK-NOT: panic
     // CHECK-NOT: fail
-    haystack
-        .as_bytes()
-        .windows(needle.len())
-        .position(|sub| sub == needle.as_bytes())
+    haystack.as_bytes().windows(needle.len()).position(|sub| sub == needle.as_bytes())
 }
 
 // CHECK-LABEL: @next