chore: use impl ToString and re-run coverage #100
clippy
20 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 20 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.2 (25ef9e3d8 2024-04-09)
- cargo 1.77.2 (e52e36006 2024-03-26)
- clippy 0.1.77 (25ef9e3 2024-04-09)
Annotations
Check warning on line 143 in src/lib.rs
github-actions / clippy
useless use of `vec!`
warning: useless use of `vec!`
--> src/lib.rs:141:16
|
141 | let args = vec![
| ________________^
142 | | "GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH",
143 | | ];
| |_____^ help: you can use an array directly: `["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
= note: `#[warn(clippy::useless_vec)]` on by default
Check warning on line 238 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:238:5
|
238 | return format!("{}.{}.{}.{}", a, b, c, d);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
238 - return format!("{}.{}.{}.{}", a, b, c, d);
238 + format!("{}.{}.{}.{}", a, b, c, d)
|
Check warning on line 202 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:202:5
|
202 | return format!("{}.{}.{}.{}", a, b, c, d);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
202 - return format!("{}.{}.{}.{}", a, b, c, d);
202 + format!("{}.{}.{}.{}", a, b, c, d)
|
Check warning on line 168 in src/lib.rs
github-actions / clippy
length comparison to zero
warning: length comparison to zero
--> src/lib.rs:168:8
|
168 | if args.len() == 0 {
| ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `args.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
Check warning on line 165 in src/lib.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/lib.rs:165:34
|
165 | let args = parse_args_to_vec(&input_val.as_str());
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `input_val.as_str()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 184 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:184:5
|
184 | return rand_number.to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
184 - return rand_number.to_string();
184 + rand_number.to_string()
|
Check warning on line 148 in src/lib.rs
github-actions / clippy
useless use of `format!`
warning: useless use of `format!`
--> src/lib.rs:148:12
|
148 | return format!("{}", args[index]); // String::from(args[index]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `args[index].to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
Check warning on line 148 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:148:5
|
148 | return format!("{}", args[index]); // String::from(args[index]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
148 - return format!("{}", args[index]); // String::from(args[index]);
148 + format!("{}", args[index])// String::from(args[index]);
|
Check warning on line 119 in src/lib.rs
github-actions / clippy
useless use of `format!`
warning: useless use of `format!`
--> src/lib.rs:119:12
|
119 | return format!("{}", args[index]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `args[index].to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `#[warn(clippy::useless_format)]` on by default
Check warning on line 119 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:119:5
|
119 | return format!("{}", args[index]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
119 - return format!("{}", args[index]);
119 + format!("{}", args[index])
|
Check warning on line 99 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:99:5
|
99 | return format!("{}@{}", &user, &email);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
99 - return format!("{}@{}", &user, &email);
99 + format!("{}@{}", &user, &email)
|
Check warning on line 78 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:78:5
|
78 | return format!("{}.{}", &domain, &tld);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
78 - return format!("{}.{}", &domain, &tld);
78 + format!("{}.{}", &domain, &tld)
|
Check warning on line 52 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:52:5
|
52 | return password;
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
52 - return password;
52 + password
|
Check warning on line 38 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:38:5
|
38 | return password;
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
38 - return password;
38 + password
|
Check warning on line 24 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:24:5
|
24 | return user;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
24 - return user;
24 + user
|
Check warning on line 8 in src/lib.rs
github-actions / clippy
single-character string constant used as pattern
warning: single-character string constant used as pattern
--> src/lib.rs:8:39
|
8 | let args: Vec<&str> = input.split(",").clone().collect();
| ^^^ help: consider using a `char`: `','`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default
Check warning on line 9 in src/lib.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/lib.rs:9:5
|
9 | return args;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
9 - return args;
9 + args
|
Check warning on line 80 in src/data.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/data.rs:80:5
|
80 | return gen_switch(name);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
80 - return gen_switch(name);
80 + gen_switch(name)
|
Check warning on line 75 in src/data.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/data.rs:75:5
|
75 | return data[index].to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
75 - return data[index].to_string();
75 + data[index].to_string()
|
Check warning on line 37 in src/data.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/data.rs:37:5
|
37 | return Ok(dataset);
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
37 - return Ok(dataset);
37 + Ok(dataset)
|