docs: Rename examples to users section #108
Annotations
20 warnings
useless use of `vec!`:
src/lib.rs#L141
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
|
unneeded `return` statement:
src/lib.rs#L238
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)
|
|
unneeded `return` statement:
src/lib.rs#L202
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)
|
|
length comparison to zero:
src/lib.rs#L168
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/lib.rs#L165
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
|
unneeded `return` statement:
src/lib.rs#L184
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()
|
|
useless use of `format!`:
src/lib.rs#L148
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
|
unneeded `return` statement:
src/lib.rs#L148
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]);
|
|
useless use of `format!`:
src/lib.rs#L119
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
|
unneeded `return` statement:
src/lib.rs#L119
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])
|
|
unneeded `return` statement:
src/lib.rs#L99
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)
|
|
unneeded `return` statement:
src/lib.rs#L78
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)
|
|
unneeded `return` statement:
src/lib.rs#L52
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
|
|
unneeded `return` statement:
src/lib.rs#L38
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
|
|
unneeded `return` statement:
src/lib.rs#L24
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
|
|
single-character string constant used as pattern:
src/lib.rs#L8
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
|
unneeded `return` statement:
src/lib.rs#L9
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
|
|
unneeded `return` statement:
src/data.rs#L89
warning: unneeded `return` statement
--> src/data.rs:89:5
|
89 | return gen_switch(name);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
89 - return gen_switch(name);
89 + gen_switch(name)
|
|
unneeded `return` statement:
src/data.rs#L84
warning: unneeded `return` statement
--> src/data.rs:84:5
|
84 | 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`
|
84 - return data[index].to_string();
84 + data[index].to_string()
|
|
unneeded `return` statement:
src/data.rs#L39
warning: unneeded `return` statement
--> src/data.rs:39:5
|
39 | 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`
|
39 - return Ok(dataset);
39 + Ok(dataset)
|
|