Skip to content

Commit d5f4c9f

Browse files
committed
Refactor slices in test cases for readability
1 parent 2b0639b commit d5f4c9f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gix-path/src/env/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ mod system_prefix {
5757

5858
#[test]
5959
fn exepath_no_relevant_subdir() {
60-
for names in [[].as_slice(), ["ucrt64"].as_slice()] {
60+
for names in [&[][..], &["ucrt64"][..]] {
6161
let exepath = ExePath::new();
6262
exepath.create_separate_subdirs(names);
6363
let outcome = system_prefix_from_exepath_var(|key| exepath.var_os_func(key));
@@ -93,10 +93,10 @@ mod system_prefix {
9393
#[test]
9494
fn exepath_ambiguous_subdir() {
9595
for names in [
96-
["mingw32", "mingw64"].as_slice(),
97-
["mingw32", "clangarm64"].as_slice(),
98-
["mingw64", "clangarm64"].as_slice(),
99-
["mingw32", "mingw64", "clangarm64"].as_slice(),
96+
&["mingw32", "mingw64"][..],
97+
&["mingw32", "clangarm64"][..],
98+
&["mingw64", "clangarm64"][..],
99+
&["mingw32", "mingw64", "clangarm64"][..],
100100
] {
101101
let exepath = ExePath::new();
102102
exepath.create_separate_subdirs(names);

0 commit comments

Comments
 (0)