Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Jun 30, 2024
1 parent 1f72784 commit cc38c78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion tests/by-util/test_date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

use crate::common::util::TestScenario;
use regex::Regex;
#[cfg(all(unix, not(target_os = "macos")))]
Expand Down
4 changes: 1 addition & 3 deletions tests/by-util/test_kill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
#![allow(clippy::flat_map_option)]

use crate::common::util::TestScenario;
use regex::Regex;
use std::os::unix::process::ExitStatusExt;
Expand Down Expand Up @@ -100,7 +98,7 @@ fn test_kill_table_lists_all_vertically() {
let signals = command
.stdout_str()
.split('\n')
.flat_map(|line| line.trim().split(' ').nth(1))
.filter_map(|line| line.trim().split(' ').nth(1))
.collect::<Vec<&str>>();

assert!(signals.contains(&"KILL"));
Expand Down
10 changes: 4 additions & 6 deletions tests/by-util/test_paste.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
#![allow(clippy::used_underscore_binding)]

use crate::common::util::TestScenario;

struct TestData<'b> {
Expand Down Expand Up @@ -169,9 +167,9 @@ fn test_delimiter_list_ending_with_escaped_backslash() {
for d in ["-d", "--delimiters"] {
let (at, mut ucmd) = at_and_ucmd!();
let mut ins = vec![];
for (i, _in) in ["a\n", "b\n"].iter().enumerate() {
for (i, one_in) in ["a\n", "b\n"].iter().enumerate() {
let file = format!("in{}", i);
at.write(&file, _in);
at.write(&file, one_in);
ins.push(file);
}
ucmd.args(&[d, "\\\\"])
Expand Down Expand Up @@ -200,9 +198,9 @@ fn test_data() {
for example in EXAMPLE_DATA {
let (at, mut ucmd) = at_and_ucmd!();
let mut ins = vec![];
for (i, _in) in example.ins.iter().enumerate() {
for (i, one_in) in example.ins.iter().enumerate() {
let file = format!("in{i}");
at.write(&file, _in);
at.write(&file, one_in);
ins.push(file);
}
println!("{}", example.name);
Expand Down

0 comments on commit cc38c78

Please sign in to comment.