mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-16 19:56:17 +00:00
remove explicit iter loops
This commit is contained in:
parent
cf24620d3d
commit
2f85610cc3
13 changed files with 17 additions and 17 deletions
|
@ -74,7 +74,7 @@ fn test_relpath_with_from_no_d() {
|
|||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
for test in TESTS.iter() {
|
||||
for test in &TESTS {
|
||||
let from: &str = &convert_path(test.from);
|
||||
let to: &str = &convert_path(test.to);
|
||||
let expected: &str = &convert_path(test.expected);
|
||||
|
@ -96,7 +96,7 @@ fn test_relpath_with_from_with_d() {
|
|||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
for test in TESTS.iter() {
|
||||
for test in &TESTS {
|
||||
let from: &str = &convert_path(test.from);
|
||||
let to: &str = &convert_path(test.to);
|
||||
let pwd = at.as_string();
|
||||
|
@ -132,7 +132,7 @@ fn test_relpath_no_from_no_d() {
|
|||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
for test in TESTS.iter() {
|
||||
for test in &TESTS {
|
||||
let to: &str = &convert_path(test.to);
|
||||
at.mkdir_all(to);
|
||||
|
||||
|
@ -150,7 +150,7 @@ fn test_relpath_no_from_with_d() {
|
|||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
for test in TESTS.iter() {
|
||||
for test in &TESTS {
|
||||
let to: &str = &convert_path(test.to);
|
||||
let pwd = at.as_string();
|
||||
at.mkdir_all(to);
|
||||
|
|
|
@ -9,7 +9,7 @@ fn test_tee_processing_multiple_operands() {
|
|||
// POSIX says: "Processing of at least 13 file operands shall be supported."
|
||||
|
||||
let content = "tee_sample_content";
|
||||
for &n in [1, 2, 12, 13].iter() {
|
||||
for &n in &[1, 2, 12, 13] {
|
||||
let files = (1..=n).map(|x| x.to_string()).collect::<Vec<_>>();
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
|
@ -18,7 +18,7 @@ fn test_tee_processing_multiple_operands() {
|
|||
.succeeds()
|
||||
.stdout_is(content);
|
||||
|
||||
for file in files.iter() {
|
||||
for file in &files {
|
||||
assert!(at.file_exists(file));
|
||||
assert_eq!(at.read(file), content);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue