mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix a lot of clippy warnings
This commit is contained in:
parent
fb812ff9d0
commit
3aeccfd802
48 changed files with 269 additions and 250 deletions
|
@ -26,7 +26,7 @@ fn test_base64_encode_file() {
|
|||
|
||||
#[test]
|
||||
fn test_decode() {
|
||||
for decode_param in vec!["-d", "--decode"] {
|
||||
for decode_param in &["-d", "--decode"] {
|
||||
let input = "aGVsbG8sIHdvcmxkIQ==";
|
||||
new_ucmd!()
|
||||
.arg(decode_param)
|
||||
|
@ -48,7 +48,7 @@ fn test_garbage() {
|
|||
|
||||
#[test]
|
||||
fn test_ignore_garbage() {
|
||||
for ignore_garbage_param in vec!["-i", "--ignore-garbage"] {
|
||||
for ignore_garbage_param in &["-i", "--ignore-garbage"] {
|
||||
let input = "aGVsbG8sIHdvcmxkIQ==\0";
|
||||
new_ucmd!()
|
||||
.arg("-d")
|
||||
|
@ -61,7 +61,7 @@ fn test_ignore_garbage() {
|
|||
|
||||
#[test]
|
||||
fn test_wrap() {
|
||||
for wrap_param in vec!["-w", "--wrap"] {
|
||||
for wrap_param in &["-w", "--wrap"] {
|
||||
let input = "The quick brown fox jumps over the lazy dog.";
|
||||
new_ucmd!()
|
||||
.arg(wrap_param)
|
||||
|
@ -74,7 +74,7 @@ fn test_wrap() {
|
|||
|
||||
#[test]
|
||||
fn test_wrap_no_arg() {
|
||||
for wrap_param in vec!["-w", "--wrap"] {
|
||||
for wrap_param in &["-w", "--wrap"] {
|
||||
new_ucmd!().arg(wrap_param).fails().stderr_contains(
|
||||
&"The argument '--wrap <wrap>' requires a value but none was supplied",
|
||||
);
|
||||
|
@ -83,7 +83,7 @@ fn test_wrap_no_arg() {
|
|||
|
||||
#[test]
|
||||
fn test_wrap_bad_arg() {
|
||||
for wrap_param in vec!["-w", "--wrap"] {
|
||||
for wrap_param in &["-w", "--wrap"] {
|
||||
new_ucmd!()
|
||||
.arg(wrap_param)
|
||||
.arg("b")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue