chore: Release #175
Annotations
1 error and 308 warnings
Test
Process completed with exit code 101.
|
using `clone` on type `FormatConfig` which implements the `Copy` trait:
crates/genemichaels/src/main.rs#L341
warning: using `clone` on type `FormatConfig` which implements the `Copy` trait
--> crates/genemichaels/src/main.rs:341:22
|
341 | let config = self.config.clone();
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
unneeded `return` statement:
crates/genemichaels/src/main.rs#L324
warning: unneeded `return` statement
--> crates/genemichaels/src/main.rs:324:9
|
324 | / return FormatPool {
325 | | log: log.clone(),
326 | | config: config,
327 | | pool: {
... |
334 | | errors: Arc::new(Mutex::new(vec![])),
335 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
324 ~ FormatPool {
325 + log: log.clone(),
326 + config: config,
327 + pool: {
328 + let mut p = threadpool::Builder::new();
329 + if let Some(t) = thread_count {
330 + p = p.num_threads(t);
331 + }
332 + p.build()
333 + },
334 + errors: Arc::new(Mutex::new(vec![])),
335 ~ }
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels/src/main.rs#L181
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels/src/main.rs:181:38
|
181 | let config = load_config(&log, &[args.config, Some(PathBuf::from(CONFIG_JSON))])?;
| ^^^^ help: change this to: `log`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels/src/main.rs#L166
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels/src/main.rs:166:38
|
166 | let config = load_config(&log, &[args.config, Some(PathBuf::from(CONFIG_JSON))])?;
| ^^^^ help: change this to: `log`
|
= 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:
crates/genemichaels/src/main.rs#L102
warning: unneeded `return` statement
--> crates/genemichaels/src/main.rs:102:21
|
102 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
102 - return true;
102 + true
|
|
question mark operator is useless here:
crates/genemichaels/src/main.rs#L93
warning: question mark operator is useless here
--> crates/genemichaels/src/main.rs:93:12
|
93 | return Ok(
| ____________^
94 | | serde_json::from_str(
95 | | &String::from_utf8(read(path).stack_context(log, "Failed to read config file")?)
96 | | .stack_context(log, "Failed to decode file as utf8")?
... |
106 | | ).stack_context(log, "Failed to parse file as json")?,
107 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `#[warn(clippy::needless_question_mark)]` on by default
help: try removing question mark and `Ok()`
|
93 ~ return serde_json::from_str(
94 + &String::from_utf8(read(path).stack_context(log, "Failed to read config file")?)
95 + .stack_context(log, "Failed to decode file as utf8")?
96 + .lines()
97 + .filter(|l| {
98 + if l.trim_start().starts_with("//") {
99 + return false;
100 + }
101 + return true;
102 + })
103 + .collect::<Vec<&str>>()
104 + .join("\n"),
105 ~ ).stack_context(log, "Failed to parse file as json");
|
|
unneeded `return` statement:
crates/genemichaels/src/main.rs#L87
warning: unneeded `return` statement
--> crates/genemichaels/src/main.rs:87:9
|
87 | return Some(p);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
87 - return Some(p);
87 + Some(p)
|
|
unneeded `return` statement:
crates/genemichaels/src/main.rs#L93
warning: unneeded `return` statement
--> crates/genemichaels/src/main.rs:93:5
|
93 | / return Ok(
94 | | serde_json::from_str(
95 | | &String::from_utf8(read(path).stack_context(log, "Failed to read config file")?)
96 | | .stack_context(log, "Failed to decode file as utf8")?
... |
106 | | ).stack_context(log, "Failed to parse file as json")?,
107 | | );
| |_____^
|
= 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`
|
93 ~ Ok(
94 + serde_json::from_str(
95 + &String::from_utf8(read(path).stack_context(log, "Failed to read config file")?)
96 + .stack_context(log, "Failed to decode file as utf8")?
97 + .lines()
98 + .filter(|l| {
99 + if l.trim_start().starts_with("//") {
100 + return false;
101 + }
102 + return true;
103 + })
104 + .collect::<Vec<&str>>()
105 + .join("\n"),
106 + ).stack_context(log, "Failed to parse file as json")?,
107 ~ )
|
|
redundant field names in struct initialization:
crates/genemichaels/src/main.rs#L326
warning: redundant field names in struct initialization
--> crates/genemichaels/src/main.rs:326:13
|
326 | config: config,
| ^^^^^^^^^^^^^^ help: replace it with: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/lib.rs#L792
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/lib.rs:792:86
|
792 | ... let prefix = format!("{}//{} ", " ".repeat(b.get(&config)), match comment.mode {
| ^^^^^^^ help: change this to: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/lib.rs#L774
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/lib.rs:774:53
|
774 | ... push!(&" ".repeat(b.get(&config)));
| ^^^^^^^ help: change this to: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/lib.rs#L770
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/lib.rs:770:40
|
770 | ... b.activate(&config);
| ^^^^^^^ help: change this to: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
using `clone` on type `FormatConfig` which implements the `Copy` trait:
crates/genemichaels-lib/src/lib.rs#L555
warning: using `clone` on type `FormatConfig` which implements the `Copy` trait
--> crates/genemichaels-lib/src/lib.rs:555:17
|
555 | config: config.clone(),
| ^^^^^^^^^^^^^^ help: try dereferencing it: `*config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
unneeded `return` statement:
crates/genemichaels-lib/src/lib.rs#L541
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/lib.rs:541:9
|
541 | return Ok(out);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
541 - return Ok(out);
541 + Ok(out)
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/lib.rs#L535
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/lib.rs:535:9
|
535 | / return Ok(FormatRes {
536 | | rendered: format!("{}{}", shebang, out.rendered),
537 | | lost_comments: out.lost_comments,
538 | | warnings: out.warnings,
539 | | });
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
535 ~ Ok(FormatRes {
536 + rendered: format!("{}{}", shebang, out.rendered),
537 + lost_comments: out.lost_comments,
538 + warnings: out.warnings,
539 ~ })
|
|
accessing first element with `new_segs.get(0)`:
crates/genemichaels-lib/src/lib.rs#L184
warning: accessing first element with `new_segs.get(0)`
--> crates/genemichaels-lib/src/lib.rs:184:21
|
184 | let seg_i = new_segs.get(0).unwrap();
| ^^^^^^^^^^^^^^^ help: try: `new_segs.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_type.rs#L708
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_type.rs:708:25
|
708 | return build_self(out, base_indent);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
708 - return build_self(out, base_indent);
708 + build_self(out, base_indent)
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_type.rs#L706
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_type.rs:706:25
|
706 | return new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
706 - return new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref());
706 + new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref())
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_type.rs#L374
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_type.rs:374:37
|
374 | sg.seg(out, &c.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `c.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_type.rs#L127
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_type.rs:127:23
|
127 | node.seg(out, &seg.value().ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `seg.value().ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1174
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1174:29
|
1174 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1169
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1169:29
|
1169 | sg.seg(out, &format!("{}::", x.ident));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}::", x.ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1151
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1151:29
|
1151 | sg.seg(out, &format!("{}: ", n));
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", n)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1033
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1033:33
|
1033 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L871
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:871:33
|
871 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L853
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:853:33
|
853 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L821
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:821:33
|
821 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L806
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:806:37
|
806 | sg.seg(out, &format!(" {}", n));
| ^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" {}", n)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L669
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:669:33
|
669 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L648
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:648:33
|
648 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L190
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:190:33
|
190 | sg.seg(out, &l.semi_token.to_token_stream());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `l.semi_token.to_token_stream()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L182
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:182:49
|
182 | ... sg.seg(out, &format!(" {} ", t.to_token_stream()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" {} ", t.to_token_stream())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L169
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:169:33
|
169 | sg.seg(out, &format!("{} ", l.let_token.to_token_stream()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{} ", l.let_token.to_token_stream())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
this loop could be written as a `while let` loop:
crates/genemichaels-lib/src/sg_pat.rs#L68
warning: this loop could be written as a `while let` loop
--> crates/genemichaels-lib/src/sg_pat.rs:68:29
|
68 | / ... loop {
69 | | ... let t = match at.1.as_ref() {
70 | | ... Pat::Tuple(t) => t,
71 | | ... _ => break,
... |
114 | | ... return sg0.build(out);
115 | | ... };
| |_______________________^ help: try: `while let Pat::Tuple(t) = at.1.as_ref() { .. }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop
= note: `#[warn(clippy::while_let_loop)]` on by default
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_general.rs#L580
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_general.rs:580:17
|
580 | / return Some(Whitespace {
581 | | loc: w.loc,
582 | | mode: WhitespaceMode::Comment(c),
583 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
580 ~ Some(Whitespace {
581 + loc: w.loc,
582 + mode: WhitespaceMode::Comment(c),
583 ~ })
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_general.rs#L574
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_general.rs:574:17
|
574 | / return Some(Whitespace {
575 | | loc: w.loc,
576 | | mode: WhitespaceMode::BlankLines(use_lines),
577 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
574 ~ Some(Whitespace {
575 + loc: w.loc,
576 + mode: WhitespaceMode::BlankLines(use_lines),
577 ~ })
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L539
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:539:41
|
539 | ... sg.seg(out, &l.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `l.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L527
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:527:45
|
527 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L515
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:515:45
|
515 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L510
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:510:45
|
510 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L505
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:505:45
|
505 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L493
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:493:41
|
493 | ... sg.seg(out, &i.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `i.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
unneeded `return` statement:
crates/aargvark/src/lib.rs#L79
warning: unneeded `return` statement
--> crates/aargvark/src/lib.rs:79:31
|
79 | VarkRet::Ok(v) => return v,
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
79 | VarkRet::Ok(v) => v,
| ~
|
unneeded `return` statement:
crates/aargvark/src/lib.rs#L66
warning: unneeded `return` statement
--> crates/aargvark/src/lib.rs:66:13
|
66 | return Ok(VarkRet::Ok(v));
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
66 - return Ok(VarkRet::Ok(v));
66 + Ok(VarkRet::Ok(v))
|
|
unneeded `return` statement:
crates/aargvark/src/lib.rs#L51
warning: unneeded `return` statement
--> crates/aargvark/src/lib.rs:51:13
|
51 | / return Ok(VarkRet::Help(VarkRetHelp {
52 | | command: state.command,
53 | | args: state.args,
54 | | consumed_args: state.i,
55 | | builder: builder,
56 | | }));
| |_______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
51 ~ Ok(VarkRet::Help(VarkRetHelp {
52 + command: state.command,
53 + args: state.args,
54 + consumed_args: state.i,
55 + builder: builder,
56 ~ }))
|
|
unneeded `return` statement:
crates/aargvark/src/lib.rs#L44
warning: unneeded `return` statement
--> crates/aargvark/src/lib.rs:44:13
|
44 | / return Err(Error {
45 | | command: state.command,
46 | | args: state.args,
47 | | detail: ErrorDetail::Incorrect(state.errors),
48 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
44 ~ Err(Error {
45 + command: state.command,
46 + args: state.args,
47 + detail: ErrorDetail::Incorrect(state.errors),
48 ~ })
|
|
unneeded `return` statement:
crates/aargvark/src/lib.rs#L37
warning: unneeded `return` statement
--> crates/aargvark/src/lib.rs:37:13
|
37 | / return Err(Error {
38 | | command: state.command,
39 | | args: state.args,
40 | | detail: ErrorDetail::TooLittle,
41 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
37 ~ Err(Error {
38 + command: state.command,
39 + args: state.args,
40 + detail: ErrorDetail::TooLittle,
41 ~ })
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L448
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:448:9
|
448 | return self.0.as_str();
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
448 - return self.0.as_str();
448 + self.0.as_str()
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L442
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:442:9
|
442 | return self.0;
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
442 - return self.0;
442 + self.0
|
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
crates/aargvark/src/traits_impls.rs#L440
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> crates/aargvark/src/traits_impls.rs:440:1
|
440 | impl Into<String> for NotFlag {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<traits_impls::NotFlag>`
|
440 ~ impl From<NotFlag> for String {
441 ~ fn from(val: NotFlag) -> Self {
442 ~ return val.0;
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L436
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:436:9
|
436 | return &self.0;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
436 - return &self.0;
436 + &self.0
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L428
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:428:9
|
428 | return self.0.clone();
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
428 - return self.0.clone();
428 + self.0.clone()
|
|
direct implementation of `ToString`:
crates/aargvark/src/traits_impls.rs#L426
warning: direct implementation of `ToString`
--> crates/aargvark/src/traits_impls.rs:426:1
|
426 | / impl ToString for NotFlag {
427 | | fn to_string(&self) -> String {
428 | | return self.0.clone();
429 | | }
430 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[warn(clippy::to_string_trait_impl)]` on by default
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L422
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:422:9
|
422 | return HelpPattern(vec![HelpPatternElement::Type("STRING".to_string())]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
422 - return HelpPattern(vec![HelpPatternElement::Type("STRING".to_string())]);
422 + HelpPattern(vec![HelpPatternElement::Type("STRING".to_string())])
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L418
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:418:9
|
418 | return Ok(NotFlag(s.to_string()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
418 - return Ok(NotFlag(s.to_string()));
418 + Ok(NotFlag(s.to_string()))
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L402
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:402:9
|
402 | return <Vec<AargvarkKV<K, V>>>::build_help_pattern(state);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
402 - return <Vec<AargvarkKV<K, V>>>::build_help_pattern(state);
402 + <Vec<AargvarkKV<K, V>>>::build_help_pattern(state)
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L398
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:398:9
|
398 | return state.r_ok(res.into_iter().map(|kv| (kv.key, kv.value)).collect());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
398 - return state.r_ok(res.into_iter().map(|kv| (kv.key, kv.value)).collect());
398 + state.r_ok(res.into_iter().map(|kv| (kv.key, kv.value)).collect())
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L386
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:386:9
|
386 | return HelpPattern(vec![HelpPatternElement::Literal("K=V".to_string())]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
386 - return HelpPattern(vec![HelpPatternElement::Literal("K=V".to_string())]);
386 + HelpPattern(vec![HelpPatternElement::Literal("K=V".to_string())])
|
|
useless conversion to the same type: `std::str::Chars<'_>`:
crates/aargvark/src/traits_impls.rs#L354
warning: useless conversion to the same type: `std::str::Chars<'_>`
--> crates/aargvark/src/traits_impls.rs:354:23
|
354 | let mut res = res.chars().into_iter();
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `res.chars()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L379
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:379:9
|
379 | / return state.r_ok(AargvarkKV {
380 | | key: key,
381 | | value: value,
382 | | });
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
379 ~ state.r_ok(AargvarkKV {
380 + key: key,
381 + value: value,
382 ~ })
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L330
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:330:9
|
330 | return HelpPattern(vec![HelpPatternElement::Array(T::build_help_pattern(state))]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
330 - return HelpPattern(vec![HelpPatternElement::Array(T::build_help_pattern(state))]);
330 + HelpPattern(vec![HelpPatternElement::Array(T::build_help_pattern(state))])
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L326
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:326:9
|
326 | return vark_from_iter(state);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
326 - return vark_from_iter(state);
326 + vark_from_iter(state)
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L320
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:320:9
|
320 | return HelpPattern(vec![HelpPatternElement::Array(T::build_help_pattern(state))]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
320 - return HelpPattern(vec![HelpPatternElement::Array(T::build_help_pattern(state))]);
320 + HelpPattern(vec![HelpPatternElement::Array(T::build_help_pattern(state))])
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L316
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:316:9
|
316 | return vark_from_iter(state);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
316 - return vark_from_iter(state);
316 + vark_from_iter(state)
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
crates/aargvark/src/traits_impls.rs#L308
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> crates/aargvark/src/traits_impls.rs:308:48
|
308 | return state.r_ok(C::from_iter(out.into_iter()));
| ^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `out`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/iter/traits/collect.rs:152:21
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L287
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:287:9
|
287 | / return AargvarkYaml {
288 | | value: self.value.clone(),
289 | | source: self.source.clone(),
290 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
287 ~ AargvarkYaml {
288 + value: self.value.clone(),
289 + source: self.source.clone(),
290 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L271
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:271:9
|
271 | / return HelpPattern(
272 | | vec![
273 | | HelpPatternElement::Variant(
274 | | vec![
... |
279 | | ],
280 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
271 ~ HelpPattern(
272 + vec![
273 + HelpPatternElement::Variant(
274 + vec![
275 + <PathBuf as AargvarkTrait>::build_help_pattern(state),
276 + HelpPattern(vec![HelpPatternElement::Literal("-".to_string())])
277 + ],
278 + )
279 + ],
280 ~ )
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L266
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:266:23
|
266 | Err(e) => return Err(e.to_string()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
266 ~ Err(e) => Err(e.to_string()),
267 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L262
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:262:22
|
262 | Ok(v) => return Ok(Self {
| ______________________^
263 | | value: v,
264 | | source: b.source,
265 | | }),
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
262 ~ Ok(v) => Ok(Self {
263 + value: v,
264 + source: b.source,
265 ~ }),
266 | Err(e) => return Err(e.to_string()),
267 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L242
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:242:9
|
242 | / return AargvarkJson {
243 | | value: self.value.clone(),
244 | | source: self.source.clone(),
245 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
242 ~ AargvarkJson {
243 + value: self.value.clone(),
244 + source: self.source.clone(),
245 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L226
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:226:9
|
226 | / return HelpPattern(
227 | | vec![
228 | | HelpPatternElement::Variant(
229 | | vec![
... |
234 | | ],
235 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
226 ~ HelpPattern(
227 + vec![
228 + HelpPatternElement::Variant(
229 + vec![
230 + <PathBuf as AargvarkTrait>::build_help_pattern(state),
231 + HelpPattern(vec![HelpPatternElement::Literal("-".to_string())])
232 + ],
233 + )
234 + ],
235 ~ )
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L221
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:221:23
|
221 | Err(e) => return Err(e.to_string()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
221 ~ Err(e) => Err(e.to_string()),
222 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L217
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:217:22
|
217 | Ok(v) => return Ok(Self {
| ______________________^
218 | | value: v,
219 | | source: b.source,
220 | | }),
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
217 ~ Ok(v) => Ok(Self {
218 + value: v,
219 + source: b.source,
220 ~ }),
221 | Err(e) => return Err(e.to_string()),
222 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L191
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:191:9
|
191 | / return HelpPattern(
192 | | vec![
193 | | HelpPatternElement::Variant(
194 | | vec![
... |
199 | | ],
200 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
191 ~ HelpPattern(
192 + vec![
193 + HelpPatternElement::Variant(
194 + vec![
195 + <PathBuf as AargvarkTrait>::build_help_pattern(state),
196 + HelpPattern(vec![HelpPatternElement::Literal("-".to_string())])
197 + ],
198 + )
199 + ],
200 ~ )
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L848
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:848:33
|
848 | sg.seg(out, &e.op.to_token_stream().to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `e.op.to_token_stream().to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L185
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:185:27
|
185 | Err(e) => return Err(format!("Error reading {}: {}", s, e)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
185 ~ Err(e) => Err(format!("Error reading {}: {}", s, e)),
186 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L181
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:181:26
|
181 | Ok(v) => return Ok(Self {
| __________________________^
182 | | value: v,
183 | | source: Source::File(PathBuf::from(s)),
184 | | }),
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
181 ~ Ok(v) => Ok(Self {
182 + value: v,
183 + source: Source::File(PathBuf::from(s)),
184 ~ }),
185 | Err(e) => return Err(format!("Error reading {}: {}", s, e)),
186 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L177
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:177:27
|
177 | Err(e) => return Err(format!("Error reading stdin: {}", e)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
177 ~ Err(e) => Err(format!("Error reading stdin: {}", e)),
178 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L173
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:173:26
|
173 | Ok(_) => return Ok(Self {
| __________________________^
174 | | value: out,
175 | | source: Source::Stdin,
176 | | }),
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
173 ~ Ok(_) => Ok(Self {
174 + value: out,
175 + source: Source::Stdin,
176 ~ }),
177 | Err(e) => return Err(format!("Error reading stdin: {}", e)),
178 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L143
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:143:9
|
143 | / return HelpPattern(
144 | | vec![
145 | | HelpPatternElement::Variant(
146 | | vec![
... |
151 | | ],
152 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
143 ~ HelpPattern(
144 + vec![
145 + HelpPatternElement::Variant(
146 + vec![
147 + HelpPattern(vec![HelpPatternElement::Literal("true".to_string())]),
148 + HelpPattern(vec![HelpPatternElement::Literal("false".to_string())])
149 + ],
150 + )
151 + ],
152 ~ )
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L139
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:139:9
|
139 | return <Self as std::str::FromStr>::from_str(s).map_err(|e| e.to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
139 - return <Self as std::str::FromStr>::from_str(s).map_err(|e| e.to_string());
139 + <Self as std::str::FromStr>::from_str(s).map_err(|e| e.to_string())
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L440
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:440:45
|
440 | ... sg.seg(out, &format!("{}: ", l.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", l.name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L76
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:76:9
|
76 | return <T as AargvarkFromStr>::build_help_pattern(state);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
76 - return <T as AargvarkFromStr>::build_help_pattern(state);
76 + <T as AargvarkFromStr>::build_help_pattern(state)
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L59
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:59:17
|
59 | / return HelpPartialProduction {
60 | | description: "".to_string(),
61 | | content: HelpPartialContent::Pattern(<Self as AargvarkTrait>::build_help_pattern(state)),
62 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
59 ~ HelpPartialProduction {
60 + description: "".to_string(),
61 + content: HelpPartialContent::Pattern(<Self as AargvarkTrait>::build_help_pattern(state)),
62 ~ }
|
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L71
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:71:23
|
71 | Err(e) => return state.r_err(e),
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
71 | Err(e) => state.r_err(e),
| ~~~~~~~~~~~~~~
|
unneeded `return` statement:
crates/aargvark/src/traits_impls.rs#L69
warning: unneeded `return` statement
--> crates/aargvark/src/traits_impls.rs:69:17
|
69 | return state.r_ok(v);
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
69 - return state.r_ok(v);
69 + state.r_ok(v)
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L296
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:296:37
|
296 | sg.seg(out, &format!(" '{}", l.ident))
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" '{}", l.ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L175
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:175:9
|
175 | return std::fmt::Display::fmt(self, f);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
175 - return std::fmt::Display::fmt(self, f);
175 + std::fmt::Display::fmt(self, f)
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L271
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:271:37
|
271 | sg.seg(out, &format!("{}: ", l.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", l.name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/base.rs#L158
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/base.rs:158:21
|
158 | text.push_str("\n");
| ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `text.push('\n')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/base.rs#L154
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/base.rs:154:21
|
154 | text.push_str("\n");
| ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `text.push('\n')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L167
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:167:17
|
167 | return text.fmt(f);
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
167 - return text.fmt(f);
167 + text.fmt(f)
|
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L128
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:128:17
|
128 | / return format_args!(
129 | | "Error parsing command line arguments: final arguments are unrecognized\n{:?}",
130 | | &self.args[*first..]
131 | | ).fmt(f);
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
128 ~ format_args!(
129 + "Error parsing command line arguments: final arguments are unrecognized\n{:?}",
130 + &self.args[*first..]
131 ~ ).fmt(f)
|
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L125
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:125:17
|
125 | return "Missing arguments, use --help for more info".fmt(f);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
125 - return "Missing arguments, use --help for more info".fmt(f);
125 + "Missing arguments, use --help for more info".fmt(f)
|
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L97
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:97:9
|
97 | return R::Err;
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
97 - return R::Err;
97 + R::Err
|
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L87
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:87:9
|
87 | return R::Ok(v);
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
87 - return R::Ok(v);
87 + R::Ok(v)
|
|
accessing first element with `children.get(0)`:
crates/genemichaels-lib/src/sg_expr.rs#L173
warning: accessing first element with `children.get(0)`
--> crates/genemichaels-lib/src/sg_expr.rs:173:48
|
173 | sg.child(build_child(out, base_indent, children.get(0).unwrap()));
| ^^^^^^^^^^^^^^^ help: try: `children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L70
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:70:9
|
70 | return self.i;
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
70 - return self.i;
70 + self.i
|
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L65
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:65:9
|
65 | return PeekR::Ok(v);
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
65 - return PeekR::Ok(v);
65 + PeekR::Ok(v)
|
|
the following explicit lifetimes could be elided: 'a:
crates/aargvark/src/base.rs#L57
warning: the following explicit lifetimes could be elided: 'a
--> crates/aargvark/src/base.rs:57:17
|
57 | pub fn peek<'a>(&'a self) -> PeekR<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
57 - pub fn peek<'a>(&'a self) -> PeekR<'a> {
57 + pub fn peek(&self) -> PeekR<'_> {
|
|
unneeded `return` statement:
crates/aargvark/src/base.rs#L46
warning: unneeded `return` statement
--> crates/aargvark/src/base.rs:46:9
|
46 | / return Self {
47 | | command: command,
48 | | args: args,
49 | | i: 0,
50 | | errors: vec![],
51 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
46 ~ Self {
47 + command: command,
48 + args: args,
49 + i: 0,
50 + errors: vec![],
51 ~ }
|
|
the function `format_content` doesn't need a mutable reference:
crates/aargvark/src/help.rs#L418
warning: the function `format_content` doesn't need a mutable reference
--> crates/aargvark/src/help.rs:418:55
|
418 | format_content(&mut out, &mut temp_stack, &mut help_state, &top.content);
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L413
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:413:13
|
413 | out.push_str(":");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(':')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
the function `format_content` doesn't need a mutable reference:
crates/aargvark/src/help.rs#L401
warning: the function `format_content` doesn't need a mutable reference
--> crates/aargvark/src/help.rs:401:59
|
401 | format_content(&mut out, &mut temp_stack, &mut help_state, content);
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
= note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/aargvark/src/help.rs#L391
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/aargvark/src/help.rs:391:42
|
391 | format_pattern(&mut out, &content);
| ^^^^^^^^ help: change this to: `content`
|
= 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
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L386
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:386:21
|
386 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L379
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:379:13
|
379 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L375
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:375:13
|
375 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
the borrowed expression implements the required traits:
crates/aargvark/src/help.rs#L335
warning: the borrowed expression implements the required traits
--> crates/aargvark/src/help.rs:335:69
|
335 | ... Cell::new(style_description(&format!("(synonym for `{}`)", first_flag)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("(synonym for `{}`)", first_flag)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L981
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:981:29
|
981 | unicode_len(&prefix),
| ^^^^^^^ help: change this to: `prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L917
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:917:43
|
917 | Node::InlineCode(t) => if get_splits(&t.value).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t.value).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L912
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:912:37
|
912 | Node::Text(t) => if get_splits(&t.value).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t.value).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L285
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:285:25
|
285 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
accessing first element with `x.children.get(0)`:
crates/genemichaels-lib/src/whitespace.rs#L910
warning: accessing first element with `x.children.get(0)`
--> crates/genemichaels-lib/src/whitespace.rs:910:17
|
910 | x.children.get(0)
| ^^^^^^^^^^^^^^^^^ help: try: `x.children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L272
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:272:25
|
272 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L267
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:267:25
|
267 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
|
the borrowed expression implements the required traits:
crates/aargvark/src/help.rs#L254
warning: the borrowed expression implements the required traits
--> crates/aargvark/src/help.rs:254:29
|
254 | ... &textwrap::Options::with_termwidth().initial_indent(" ").subsequent_indent(" "),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `textwrap::Options::with_termwidth().initial_indent(" ").subsequent_indent(" ")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L422
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:422:9
|
422 | return out;
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
422 - return out;
422 + out
|
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L865
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:865:24
|
865 | if get_splits(&t).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L857
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:857:24
|
857 | if get_splits(&t).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
accessing first element with `x.children.get(0)`:
crates/genemichaels-lib/src/whitespace.rs#L853
warning: accessing first element with `x.children.get(0)`
--> crates/genemichaels-lib/src/whitespace.rs:853:17
|
853 | x.children.get(0)
| ^^^^^^^^^^^^^^^^^ help: try: `x.children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L233
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:233:9
|
233 | return (key, out);
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
233 - return (key, out);
233 + (key, out)
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L221
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:221:9
|
221 | return (key, out);
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
221 - return (key, out);
221 + (key, out)
|
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L821
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:821:20
|
821 | match (get_splits(&join_lines(&alt)).first().is_some(), &x.title) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&join_lines(&alt)).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
= note: `#[warn(clippy::unnecessary_first_then_check)]` on by default
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L206
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:206:9
|
206 | return key;
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
206 - return key;
206 + key
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L165
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:165:47
|
165 | HelpPatternElement::Variant(i) => return i
| _______________________________________________^
166 | | .iter()
167 | | .map(|x| x.render(stack, state))
168 | | .collect::<Vec<_>>()
169 | | .join(&style_logical(" | ")),
| |____________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
165 ~ HelpPatternElement::Variant(i) => i
166 + .iter()
167 + .map(|x| x.render(stack, state))
168 + .collect::<Vec<_>>()
169 ~ .join(&style_logical(" | ")),
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L164
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:164:45
|
164 | HelpPatternElement::Array(i) => return format!("{}{}", i.render(stack, state), style_logical("[ ...]")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
164 | HelpPatternElement::Array(i) => format!("{}{}", i.render(stack, state), style_logical("[ ...]")),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L158
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:158:46
|
158 | HelpPatternElement::Option(i) => return format!(
| ______________________________________________^
159 | | "{}{}{}",
160 | | style_logical("["),
161 | | i.render(stack, state),
162 | | style_logical("]")
163 | | ),
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
158 ~ HelpPatternElement::Option(i) => format!(
159 + "{}{}{}",
160 + style_logical("["),
161 + i.render(stack, state),
162 + style_logical("]")
163 ~ ),
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L156
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:156:17
|
156 | return style_id(key.as_str())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
156 | style_id(key.as_str())
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L153
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:153:17
|
153 | return style_id(production.id.as_str())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
153 | style_id(production.id.as_str())
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L149
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:149:44
|
149 | HelpPatternElement::Type(i) => return style_type(format!("<{}>", i)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
149 | HelpPatternElement::Type(i) => style_type(format!("<{}>", i)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L148
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:148:47
|
148 | HelpPatternElement::Literal(l) => return style_literal(l),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
148 | HelpPatternElement::Literal(l) => style_literal(l),
| ~~~~~~~~~~~~~~~~
|
calling `push_str()` using a single-character string literal:
crates/aargvark/src/help.rs#L118
warning: calling `push_str()` using a single-character string literal
--> crates/aargvark/src/help.rs:118:17
|
118 | out.push_str(" ");
| ^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `out.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
= note: `#[warn(clippy::single_char_add_str)]` on by default
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L122
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:122:9
|
122 | return out;
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
122 - return out;
122 + out
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L69
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:69:9
|
69 | return HelpPartialContent::Production(HelpProductionType::Enum(Rc::new(RefCell::new(variants))));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
69 - return HelpPartialContent::Production(HelpProductionType::Enum(Rc::new(RefCell::new(variants))));
69 + HelpPartialContent::Production(HelpProductionType::Enum(Rc::new(RefCell::new(variants))))
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L60
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:60:9
|
60 | / return HelpPartialContent::Production(
61 | | HelpProductionType::Struct(Rc::new(RefCell::new(HelpProductionTypeStruct {
62 | | fields: fields,
63 | | flag_fields: optional_fields,
64 | | }))),
65 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
60 ~ HelpPartialContent::Production(
61 + HelpProductionType::Struct(Rc::new(RefCell::new(HelpProductionTypeStruct {
62 + fields: fields,
63 + flag_fields: optional_fields,
64 + }))),
65 ~ )
|
|
this expression borrows a value the compiler would automatically borrow:
crates/genemichaels-lib/src/whitespace.rs#L627
warning: this expression borrows a value the compiler would automatically borrow
--> crates/genemichaels-lib/src/whitespace.rs:627:70
|
627 | write_forward_breaks(state, &mut s, out, max_len, false, (&text[b..]).to_string(), b, breaks);
| ^^^^^^^^^^^^ help: change this to: `text[b..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L35
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:35:5
|
35 | return console::Style::new().bold().apply_to(s.as_ref()).to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
35 - return console::Style::new().bold().apply_to(s.as_ref()).to_string();
35 + console::Style::new().bold().apply_to(s.as_ref()).to_string()
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L31
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:31:5
|
31 | return console::Style::new().dim().apply_to(s.as_ref()).to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
31 - return console::Style::new().dim().apply_to(s.as_ref()).to_string();
31 + console::Style::new().dim().apply_to(s.as_ref()).to_string()
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L27
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:27:5
|
27 | return console::Style::new().magenta().apply_to(s.as_ref()).to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
27 - return console::Style::new().magenta().apply_to(s.as_ref()).to_string();
27 + console::Style::new().magenta().apply_to(s.as_ref()).to_string()
|
|
this expression borrows a value the compiler would automatically borrow:
crates/genemichaels-lib/src/whitespace.rs#L612
warning: this expression borrows a value the compiler would automatically borrow
--> crates/genemichaels-lib/src/whitespace.rs:612:17
|
612 | (&text[found.writable..]).to_string(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `text[found.writable..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L23
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:23:5
|
23 | return console::Style::new().blue().dim().apply_to(s.as_ref()).to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
23 - return console::Style::new().blue().dim().apply_to(s.as_ref()).to_string();
23 + console::Style::new().blue().dim().apply_to(s.as_ref()).to_string()
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L19
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:19:5
|
19 | return s.as_ref().to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
19 - return s.as_ref().to_string();
19 + s.as_ref().to_string()
|
|
unneeded `return` statement:
crates/aargvark/src/help.rs#L15
warning: unneeded `return` statement
--> crates/aargvark/src/help.rs:15:5
|
15 | return s.as_ref().to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
15 - return s.as_ref().to_string();
15 + s.as_ref().to_string()
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L565
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:565:40
|
565 | state.line_buffer.push_str(&text);
| ^^^^^ help: change this to: `text`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:550:50
|
550 | writable: if width + unicode_len(&text) > max_len {
| ^^^^^ help: change this to: `text`
|
= 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:
crates/genemichaels-lib/src/whitespace.rs#L549
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/whitespace.rs:549:13
|
549 | / return FoundWritableLen {
550 | | writable: if width + unicode_len(&text) > max_len {
551 | | writable
552 | | } else {
... |
556 | | next_break: None,
557 | | };
| |_____________^
|
= 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`
|
549 ~ FoundWritableLen {
550 + writable: if width + unicode_len(&text) > max_len {
551 + writable
552 + } else {
553 + text.len()
554 + },
555 + previous_break: previous_break,
556 + next_break: None,
557 ~ }
|
|
calling `push_str()` using a single-character string literal:
crates/genemichaels-lib/src/whitespace.rs#L259
warning: calling `push_str()` using a single-character string literal
--> crates/genemichaels-lib/src/whitespace.rs:259:25
|
259 | previous_comment.lines.push_str("\n");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `previous_comment.lines.push('\n')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
= note: `#[warn(clippy::single_char_add_str)]` on by default
|
use of `or_insert` to construct default value:
crates/genemichaels-lib/src/whitespace.rs#L240
warning: use of `or_insert` to construct default value
--> crates/genemichaels-lib/src/whitespace.rs:240:79
|
240 | let whitespaces = self.whitespaces.entry(HashLineColumn(end)).or_insert(vec![]);
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
useless conversion to the same type: `&str`:
crates/genemichaels-lib/src/whitespace.rs#L183
warning: useless conversion to the same type: `&str`
--> crates/genemichaels-lib/src/whitespace.rs:183:65
|
183 | ... buffer.add(CommentMode::Normal, "".into());
| ^^^^^^^^^ help: consider removing `.into()`: `""`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
the following explicit lifetimes could be elided: 'a:
crates/genemichaels-lib/src/whitespace.rs#L74
warning: the following explicit lifetimes could be elided: 'a
--> crates/genemichaels-lib/src/whitespace.rs:74:10
|
74 | impl<'a> State<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
74 - impl<'a> State<'a> {
74 + impl State<'_> {
|
|
redundant field names in struct initialization:
crates/aargvark/src/lib.rs#L55
warning: redundant field names in struct initialization
--> crates/aargvark/src/lib.rs:55:17
|
55 | builder: builder,
| ^^^^^^^^^^^^^^^^ help: replace it with: `builder`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/traits_impls.rs#L381
warning: redundant field names in struct initialization
--> crates/aargvark/src/traits_impls.rs:381:13
|
381 | value: value,
| ^^^^^^^^^^^^ help: replace it with: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/traits_impls.rs#L380
warning: redundant field names in struct initialization
--> crates/aargvark/src/traits_impls.rs:380:13
|
380 | key: key,
| ^^^^^^^^ help: replace it with: `key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
this `else { if .. }` block can be collapsed:
crates/aargvark/src/traits_impls.rs#L361
warning: this `else { if .. }` block can be collapsed
--> crates/aargvark/src/traits_impls.rs:361:20
|
361 | } else {
| ____________________^
362 | | if c == '\\' {
363 | | escape = true;
364 | | } else if c == '=' {
... |
368 | | }
369 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
361 ~ } else if c == '\\' {
362 + escape = true;
363 + } else if c == '=' {
364 + break;
365 + } else {
366 + k.push(c);
367 + }
|
|
redundant field names in struct initialization:
crates/aargvark/src/base.rs#L48
warning: redundant field names in struct initialization
--> crates/aargvark/src/base.rs:48:13
|
48 | args: args,
| ^^^^^^^^^^ help: replace it with: `args`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/base.rs#L47
warning: redundant field names in struct initialization
--> crates/aargvark/src/base.rs:47:13
|
47 | command: command,
| ^^^^^^^^^^^^^^^^ help: replace it with: `command`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/help.rs#L204
warning: redundant field names in struct initialization
--> crates/aargvark/src/help.rs:204:13
|
204 | content: content,
| ^^^^^^^^^^^^^^^^ help: replace it with: `content`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/help.rs#L202
warning: redundant field names in struct initialization
--> crates/aargvark/src/help.rs:202:13
|
202 | id: id,
| ^^^^^^ help: replace it with: `id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/help.rs#L198
warning: redundant field names in struct initialization
--> crates/aargvark/src/help.rs:198:13
|
198 | type_id: type_id,
| ^^^^^^^^^^^^^^^^ help: replace it with: `type_id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/aargvark/src/help.rs#L62
warning: redundant field names in struct initialization
--> crates/aargvark/src/help.rs:62:17
|
62 | fields: fields,
| ^^^^^^^^^^^^^^ help: replace it with: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L724
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:724:5
|
724 | / return match gen_impl(parse_macro_input!(input as DeriveInput)) {
725 | | Ok(x) => x,
726 | | Err(e) => e.to_compile_error(),
727 | | }.into();
| |____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
724 ~ match gen_impl(parse_macro_input!(input as DeriveInput)) {
725 + Ok(x) => x,
726 + Err(e) => e.to_compile_error(),
727 ~ }.into()
|
|
unneeded late initialization:
crates/aargvark_proc_macros/src/lib.rs#L649
warning: unneeded late initialization
--> crates/aargvark_proc_macros/src/lib.rs:649:17
|
649 | let help_variant_pattern;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
help: move the declaration `help_variant_pattern` here and remove the assignments from the branches
|
649 ~
650 ~ let help_variant_pattern = if type_attr.break_help || variant_vark_attr.break_help {
651 ~ quote!(a::HelpPattern(vec![a::HelpPatternElement::PseudoReference("...".to_string())]))
652 | } else {
653 ~ partial_help_variant_pattern
654 ~ };
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L701
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:701:5
|
701 | / return Ok(quote!{
702 | | impl #decl_generics aargvark:: traits_impls:: AargvarkTrait for #ident #forward_generics {
703 | | fn vark(state:& mut aargvark:: base:: VarkState) -> aargvark:: base:: R < #ident #forward_generics > {
704 | | mod a {
... |
718 | | }
719 | | });
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
701 ~ Ok(quote!{
702 + impl #decl_generics aargvark:: traits_impls:: AargvarkTrait for #ident #forward_generics {
703 + fn vark(state:& mut aargvark:: base:: VarkState) -> aargvark:: base:: R < #ident #forward_generics > {
704 + mod a {
705 + pub use aargvark::help::*;
706 + pub use aargvark::base::*;
707 + pub use aargvark::traits_impls::*;
708 + }
709 + #vark
710 + }
711 + fn build_help_pattern(state:& mut aargvark:: help:: HelpState) -> aargvark:: help:: HelpPattern {
712 + mod a {
713 + pub use aargvark::help::*;
714 + pub use aargvark::traits_impls::*;
715 + }
716 + #help_build
717 + }
718 + }
719 ~ })
|
|
unneeded late initialization:
crates/aargvark_proc_macros/src/lib.rs#L350
warning: unneeded late initialization
--> crates/aargvark_proc_macros/src/lib.rs:350:21
|
350 | let field_help_pattern;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `#[warn(clippy::needless_late_init)]` on by default
help: move the declaration `field_help_pattern` here and remove the assignments from the branches
|
350 ~
351 ~ let field_help_pattern = if type_break_help || field_vark_attr.break_help {
352 ~ quote!(a::HelpPattern(vec![]))
353 | }
354 | else {
355 ~ gen.help_pattern
356 ~ };
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L557
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:557:13
|
557 | / return Ok(GenRec {
558 | | vark: quote!{
559 | | state.r_ok(#ident)
560 | | },
... |
563 | | },
564 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
557 ~ Ok(GenRec {
558 + vark: quote!{
559 + state.r_ok(#ident)
560 + },
561 + help_pattern: quote!{
562 + a::HelpPattern(vec![])
563 + },
564 ~ })
565 | },
566 ~ }
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L544
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:544:13
|
544 | / return Ok(
545 | | gen_impl_unnamed(
546 | | &ident.to_string(),
547 | | parent_ident,
... |
553 | | ),
554 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
544 ~ Ok(
545 + gen_impl_unnamed(
546 + &ident.to_string(),
547 + parent_ident,
548 + ident.to_token_stream(),
549 + help_placeholder,
550 + help_docstr,
551 + subtype_index,
552 + &fields,
553 + ),
554 ~ )
555 | },
...
565 | },
566 ~ }
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L518
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:518:13
|
518 | / return Ok(GenRec {
519 | | vark: vark,
520 | | help_pattern: quote!{
521 | | {
... |
536 | | },
537 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
518 ~ Ok(GenRec {
519 + vark: vark,
520 + help_pattern: quote!{
521 + {
522 + let(
523 + key,
524 + struct_
525 + ) = state.add_struct(
526 + std::any::TypeId::of::<Self>(),
527 + #subtype_index,
528 + #help_placeholder,
529 + #help_docstr
530 + );
531 + let mut struct_ = struct_.as_ref().borrow_mut();
532 + #(#help_fields) *
533 + //. .
534 + a:: HelpPattern(vec![a::HelpPatternElement::Reference(key)])
535 + }
536 + },
537 ~ })
538 | },
...
565 | },
566 ~ }
|
|
this function has too many arguments (9/7):
crates/aargvark_proc_macros/src/lib.rs#L254
warning: this function has too many arguments (9/7)
--> crates/aargvark_proc_macros/src/lib.rs:254:1
|
254 | / fn gen_impl_struct(
255 | | parent_ident: TokenStream,
256 | | ident: TokenStream,
257 | | decl_generics: &TokenStream,
... |
263 | | d: &Fields,
264 | | ) -> Result<GenRec, syn::Error> {
| |_______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L251
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:251:5
|
251 | return Some(t);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
251 - return Some(t);
251 + Some(t)
|
|
manual implementation of an assign operation:
crates/aargvark_proc_macros/src/lib.rs#L162
warning: manual implementation of an assign operation
--> crates/aargvark_proc_macros/src/lib.rs:162:17
|
162 | placeholder_i = placeholder_i / 27;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `placeholder_i /= 27`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
|
casting a character literal to `u8` truncates:
crates/aargvark_proc_macros/src/lib.rs#L158
warning: casting a character literal to `u8` truncates
--> crates/aargvark_proc_macros/src/lib.rs:158:35
|
158 | placeholder.push((('A' as u8) + (placeholder_i % 27) as u8) as char);
| ^^^^^^^^^^^ help: use a byte literal instead: `b'A'`
|
= note: `char` is four bytes wide, but `u8` is a single byte
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
= note: `#[warn(clippy::char_lit_as_u8)]` on by default
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L191
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:191:5
|
191 | / return GenRec {
192 | | vark: quote!{
193 | | loop {
194 | | #(#parse_positional) * break state.r_ok(#ident(#(#copy_fields), *));
... |
221 | | },
222 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
191 ~ GenRec {
192 + vark: quote!{
193 + loop {
194 + #(#parse_positional) * break state.r_ok(#ident(#(#copy_fields), *));
195 + }
196 + },
197 + help_pattern: if fields.is_empty() {
198 + quote!{
199 + a::HelpPattern(vec![])
200 + }
201 + } else if help_unit_transparent {
202 + help_field_patterns.pop().unwrap()
203 + } else {
204 + quote!{
205 + {
206 + let(
207 + key,
208 + struct_
209 + ) = state.add_struct(
210 + std:: any:: TypeId:: of::< #parent_ident >(),
211 + #subtype_index,
212 + #help_placeholder,
213 + #help_docstr
214 + );
215 + let mut struct_ = struct_.as_ref().borrow_mut();
216 + #(#help_fields) *
217 + //. .
218 + a:: HelpPattern(vec![a::HelpPatternElement::Reference(key)])
219 + }
220 + }
221 + },
222 ~ }
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L113
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:113:13
|
113 | / return gen_impl_unnamed(
114 | | path,
115 | | ty.to_token_stream(),
116 | | quote!(),
... |
120 | | t.elems.iter().map(|e| (FieldAttr::default(), String::new(), e)).collect::<Vec<_>>().as_slice(),
121 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
113 ~ gen_impl_unnamed(
114 + path,
115 + ty.to_token_stream(),
116 + quote!(),
117 + "TUPLE",
118 + "",
119 + 0,
120 + t.elems.iter().map(|e| (FieldAttr::default(), String::new(), e)).collect::<Vec<_>>().as_slice(),
121 ~ )
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L103
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:103:13
|
103 | / return GenRec {
104 | | vark: quote!{
105 | | < #t >:: vark(state)
106 | | },
... |
109 | | },
110 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
103 ~ GenRec {
104 + vark: quote!{
105 + < #t >:: vark(state)
106 + },
107 + help_pattern: quote!{
108 + < #t as a:: AargvarkTrait >:: build_help_pattern(state)
109 + },
110 ~ }
|
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/lib.rs#L856
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/lib.rs:856:9
|
856 | warnings: warnings,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `warnings`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/lib.rs#L854
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/lib.rs:854:9
|
854 | rendered: rendered,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `rendered`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L555
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:555:17
|
555 | previous_break: previous_break,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L543
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:543:25
|
543 | next_break: next_break,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `next_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L542
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:542:25
|
542 | previous_break: previous_break,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L541
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:541:25
|
541 | writable: writable,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `writable`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L465
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:465:13
|
465 | base_prefix_len: base_prefix_len,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_prefix_len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L312
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:312:9
|
312 | line_lookup: line_lookup,
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `line_lookup`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L311
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:311:9
|
311 | keep_max_blank_lines: keep_max_blank_lines,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `keep_max_blank_lines`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L310
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:310:9
|
310 | source: source,
| ^^^^^^^^^^^^^^ help: replace it with: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`:
crates/genemichaels-lib/src/lib.rs#L5
warning: lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`
--> crates/genemichaels-lib/src/lib.rs:5:5
|
5 | clippy::derive_hash_xor_eq
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::derived_hash_with_manual_eq`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
redundant field names in struct initialization:
crates/aargvark_proc_macros/src/lib.rs#L519
warning: redundant field names in struct initialization
--> crates/aargvark_proc_macros/src/lib.rs:519:17
|
519 | vark: vark,
| ^^^^^^^^^^ help: replace it with: `vark`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L701
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:701:5
|
701 | / return Ok(quote!{
702 | | impl #decl_generics aargvark:: traits_impls:: AargvarkTrait for #ident #forward_generics {
703 | | fn vark(state:& mut aargvark:: base:: VarkState) -> aargvark:: base:: R < #ident #forward_generics > {
704 | | mod a {
... |
718 | | }
719 | | });
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
701 ~ Ok(quote!{
702 + impl #decl_generics aargvark:: traits_impls:: AargvarkTrait for #ident #forward_generics {
703 + fn vark(state:& mut aargvark:: base:: VarkState) -> aargvark:: base:: R < #ident #forward_generics > {
704 + mod a {
705 + pub use aargvark::help::*;
706 + pub use aargvark::base::*;
707 + pub use aargvark::traits_impls::*;
708 + }
709 + #vark
710 + }
711 + fn build_help_pattern(state:& mut aargvark:: help:: HelpState) -> aargvark:: help:: HelpPattern {
712 + mod a {
713 + pub use aargvark::help::*;
714 + pub use aargvark::traits_impls::*;
715 + }
716 + #help_build
717 + }
718 + }
719 ~ })
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/lib.rs#L774
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/lib.rs:774:53
|
774 | ... push!(&" ".repeat(b.get(&config)));
| ^^^^^^^ help: change this to: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unneeded `return` statement:
crates/genemichaels-lib/src/lib.rs#L541
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/lib.rs:541:9
|
541 | return Ok(out);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
541 - return Ok(out);
541 + Ok(out)
|
|
accessing first element with `new_segs.get(0)`:
crates/genemichaels-lib/src/lib.rs#L184
warning: accessing first element with `new_segs.get(0)`
--> crates/genemichaels-lib/src/lib.rs:184:21
|
184 | let seg_i = new_segs.get(0).unwrap();
| ^^^^^^^^^^^^^^^ help: try: `new_segs.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_type.rs#L708
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_type.rs:708:25
|
708 | return build_self(out, base_indent);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
708 - return build_self(out, base_indent);
708 + build_self(out, base_indent)
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_type.rs#L706
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_type.rs:706:25
|
706 | return new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
706 - return new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref());
706 + new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref())
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L557
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:557:13
|
557 | / return Ok(GenRec {
558 | | vark: quote!{
559 | | state.r_ok(#ident)
560 | | },
... |
563 | | },
564 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
557 ~ Ok(GenRec {
558 + vark: quote!{
559 + state.r_ok(#ident)
560 + },
561 + help_pattern: quote!{
562 + a::HelpPattern(vec![])
563 + },
564 ~ })
565 | },
566 ~ }
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L544
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:544:13
|
544 | / return Ok(
545 | | gen_impl_unnamed(
546 | | &ident.to_string(),
547 | | parent_ident,
... |
553 | | ),
554 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
544 ~ Ok(
545 + gen_impl_unnamed(
546 + &ident.to_string(),
547 + parent_ident,
548 + ident.to_token_stream(),
549 + help_placeholder,
550 + help_docstr,
551 + subtype_index,
552 + &fields,
553 + ),
554 ~ )
555 | },
...
565 | },
566 ~ }
|
|
this function has too many arguments (9/7):
crates/aargvark_proc_macros/src/lib.rs#L254
warning: this function has too many arguments (9/7)
--> crates/aargvark_proc_macros/src/lib.rs:254:1
|
254 | / fn gen_impl_struct(
255 | | parent_ident: TokenStream,
256 | | ident: TokenStream,
257 | | decl_generics: &TokenStream,
... |
263 | | d: &Fields,
264 | | ) -> Result<GenRec, syn::Error> {
| |_______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_type.rs#L374
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_type.rs:374:37
|
374 | sg.seg(out, &c.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `c.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1174
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1174:29
|
1174 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1169
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1169:29
|
1169 | sg.seg(out, &format!("{}::", x.ident));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}::", x.ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1151
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1151:29
|
1151 | sg.seg(out, &format!("{}: ", n));
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", n)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
manual implementation of an assign operation:
crates/aargvark_proc_macros/src/lib.rs#L162
warning: manual implementation of an assign operation
--> crates/aargvark_proc_macros/src/lib.rs:162:17
|
162 | placeholder_i = placeholder_i / 27;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `placeholder_i /= 27`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L191
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:191:5
|
191 | / return GenRec {
192 | | vark: quote!{
193 | | loop {
194 | | #(#parse_positional) * break state.r_ok(#ident(#(#copy_fields), *));
... |
221 | | },
222 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
191 ~ GenRec {
192 + vark: quote!{
193 + loop {
194 + #(#parse_positional) * break state.r_ok(#ident(#(#copy_fields), *));
195 + }
196 + },
197 + help_pattern: if fields.is_empty() {
198 + quote!{
199 + a::HelpPattern(vec![])
200 + }
201 + } else if help_unit_transparent {
202 + help_field_patterns.pop().unwrap()
203 + } else {
204 + quote!{
205 + {
206 + let(
207 + key,
208 + struct_
209 + ) = state.add_struct(
210 + std:: any:: TypeId:: of::< #parent_ident >(),
211 + #subtype_index,
212 + #help_placeholder,
213 + #help_docstr
214 + );
215 + let mut struct_ = struct_.as_ref().borrow_mut();
216 + #(#help_fields) *
217 + //. .
218 + a:: HelpPattern(vec![a::HelpPatternElement::Reference(key)])
219 + }
220 + }
221 + },
222 ~ }
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L113
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:113:13
|
113 | / return gen_impl_unnamed(
114 | | path,
115 | | ty.to_token_stream(),
116 | | quote!(),
... |
120 | | t.elems.iter().map(|e| (FieldAttr::default(), String::new(), e)).collect::<Vec<_>>().as_slice(),
121 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
113 ~ gen_impl_unnamed(
114 + path,
115 + ty.to_token_stream(),
116 + quote!(),
117 + "TUPLE",
118 + "",
119 + 0,
120 + t.elems.iter().map(|e| (FieldAttr::default(), String::new(), e)).collect::<Vec<_>>().as_slice(),
121 ~ )
|
|
unneeded `return` statement:
crates/aargvark_proc_macros/src/lib.rs#L103
warning: unneeded `return` statement
--> crates/aargvark_proc_macros/src/lib.rs:103:13
|
103 | / return GenRec {
104 | | vark: quote!{
105 | | < #t >:: vark(state)
106 | | },
... |
109 | | },
110 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
103 ~ GenRec {
104 + vark: quote!{
105 + < #t >:: vark(state)
106 + },
107 + help_pattern: quote!{
108 + < #t as a:: AargvarkTrait >:: build_help_pattern(state)
109 + },
110 ~ }
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L853
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:853:33
|
853 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L821
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:821:33
|
821 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L806
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:806:37
|
806 | sg.seg(out, &format!(" {}", n));
| ^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" {}", n)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L669
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:669:33
|
669 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L648
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:648:33
|
648 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L190
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:190:33
|
190 | sg.seg(out, &l.semi_token.to_token_stream());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `l.semi_token.to_token_stream()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_general.rs#L580
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_general.rs:580:17
|
580 | / return Some(Whitespace {
581 | | loc: w.loc,
582 | | mode: WhitespaceMode::Comment(c),
583 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
580 ~ Some(Whitespace {
581 + loc: w.loc,
582 + mode: WhitespaceMode::Comment(c),
583 ~ })
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_general.rs#L574
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_general.rs:574:17
|
574 | / return Some(Whitespace {
575 | | loc: w.loc,
576 | | mode: WhitespaceMode::BlankLines(use_lines),
577 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
574 ~ Some(Whitespace {
575 + loc: w.loc,
576 + mode: WhitespaceMode::BlankLines(use_lines),
577 ~ })
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L539
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:539:41
|
539 | ... sg.seg(out, &l.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `l.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L527
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:527:45
|
527 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L515
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:515:45
|
515 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L510
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:510:45
|
510 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L505
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:505:45
|
505 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L493
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:493:41
|
493 | ... sg.seg(out, &i.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `i.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L440
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:440:45
|
440 | ... sg.seg(out, &format!("{}: ", l.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", l.name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L296
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:296:37
|
296 | sg.seg(out, &format!(" '{}", l.ident))
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" '{}", l.ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L271
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:271:37
|
271 | sg.seg(out, &format!("{}: ", l.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", l.name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
accessing first element with `children.get(0)`:
crates/genemichaels-lib/src/sg_expr.rs#L173
warning: accessing first element with `children.get(0)`
--> crates/genemichaels-lib/src/sg_expr.rs:173:48
|
173 | sg.child(build_child(out, base_indent, children.get(0).unwrap()));
| ^^^^^^^^^^^^^^^ help: try: `children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L981
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:981:29
|
981 | unicode_len(&prefix),
| ^^^^^^^ help: change this to: `prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L917
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:917:43
|
917 | Node::InlineCode(t) => if get_splits(&t.value).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t.value).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L912
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:912:37
|
912 | Node::Text(t) => if get_splits(&t.value).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t.value).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L865
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:865:24
|
865 | if get_splits(&t).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L857
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:857:24
|
857 | if get_splits(&t).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
this expression borrows a value the compiler would automatically borrow:
crates/genemichaels-lib/src/whitespace.rs#L627
warning: this expression borrows a value the compiler would automatically borrow
--> crates/genemichaels-lib/src/whitespace.rs:627:70
|
627 | write_forward_breaks(state, &mut s, out, max_len, false, (&text[b..]).to_string(), b, breaks);
| ^^^^^^^^^^^^ help: change this to: `text[b..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
crates/genemichaels-lib/src/whitespace.rs#L612
warning: this expression borrows a value the compiler would automatically borrow
--> crates/genemichaels-lib/src/whitespace.rs:612:17
|
612 | (&text[found.writable..]).to_string(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `text[found.writable..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L565
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:565:40
|
565 | state.line_buffer.push_str(&text);
| ^^^^^ help: change this to: `text`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:550:50
|
550 | writable: if width + unicode_len(&text) > max_len {
| ^^^^^ help: change this to: `text`
|
= 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
|
calling `push_str()` using a single-character string literal:
crates/genemichaels-lib/src/whitespace.rs#L259
warning: calling `push_str()` using a single-character string literal
--> crates/genemichaels-lib/src/whitespace.rs:259:25
|
259 | previous_comment.lines.push_str("\n");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `previous_comment.lines.push('\n')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
= note: `#[warn(clippy::single_char_add_str)]` on by default
|
use of `or_insert` to construct default value:
crates/genemichaels-lib/src/whitespace.rs#L240
warning: use of `or_insert` to construct default value
--> crates/genemichaels-lib/src/whitespace.rs:240:79
|
240 | let whitespaces = self.whitespaces.entry(HashLineColumn(end)).or_insert(vec![]);
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
useless conversion to the same type: `&str`:
crates/genemichaels-lib/src/whitespace.rs#L183
warning: useless conversion to the same type: `&str`
--> crates/genemichaels-lib/src/whitespace.rs:183:65
|
183 | ... buffer.add(CommentMode::Normal, "".into());
| ^^^^^^^^^ help: consider removing `.into()`: `""`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
the following explicit lifetimes could be elided: 'a:
crates/genemichaels-lib/src/whitespace.rs#L74
warning: the following explicit lifetimes could be elided: 'a
--> crates/genemichaels-lib/src/whitespace.rs:74:10
|
74 | impl<'a> State<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
74 - impl<'a> State<'a> {
74 + impl State<'_> {
|
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/lib.rs#L854
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/lib.rs:854:9
|
854 | rendered: rendered,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `rendered`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L555
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:555:17
|
555 | previous_break: previous_break,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L543
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:543:25
|
543 | next_break: next_break,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `next_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L542
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:542:25
|
542 | previous_break: previous_break,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L541
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:541:25
|
541 | writable: writable,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `writable`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L465
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:465:13
|
465 | base_prefix_len: base_prefix_len,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_prefix_len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L312
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:312:9
|
312 | line_lookup: line_lookup,
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `line_lookup`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L311
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:311:9
|
311 | keep_max_blank_lines: keep_max_blank_lines,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `keep_max_blank_lines`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L310
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:310:9
|
310 | source: source,
| ^^^^^^^^^^^^^^ help: replace it with: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`:
crates/genemichaels-lib/src/lib.rs#L5
warning: lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`
--> crates/genemichaels-lib/src/lib.rs:5:5
|
5 | clippy::derive_hash_xor_eq
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::derived_hash_with_manual_eq`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
using `clone` on type `FormatConfig` which implements the `Copy` trait:
crates/genemichaels-lib/src/lib.rs#L555
warning: using `clone` on type `FormatConfig` which implements the `Copy` trait
--> crates/genemichaels-lib/src/lib.rs:555:17
|
555 | config: config.clone(),
| ^^^^^^^^^^^^^^ help: try dereferencing it: `*config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
unneeded `return` statement:
crates/genemichaels-lib/src/lib.rs#L541
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/lib.rs:541:9
|
541 | return Ok(out);
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
541 - return Ok(out);
541 + Ok(out)
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/lib.rs#L535
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/lib.rs:535:9
|
535 | / return Ok(FormatRes {
536 | | rendered: format!("{}{}", shebang, out.rendered),
537 | | lost_comments: out.lost_comments,
538 | | warnings: out.warnings,
539 | | });
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
535 ~ Ok(FormatRes {
536 + rendered: format!("{}{}", shebang, out.rendered),
537 + lost_comments: out.lost_comments,
538 + warnings: out.warnings,
539 ~ })
|
|
accessing first element with `new_segs.get(0)`:
crates/genemichaels-lib/src/lib.rs#L184
warning: accessing first element with `new_segs.get(0)`
--> crates/genemichaels-lib/src/lib.rs:184:21
|
184 | let seg_i = new_segs.get(0).unwrap();
| ^^^^^^^^^^^^^^^ help: try: `new_segs.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_type.rs#L708
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_type.rs:708:25
|
708 | return build_self(out, base_indent);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
708 - return build_self(out, base_indent);
708 + build_self(out, base_indent)
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_type.rs#L706
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_type.rs:706:25
|
706 | return new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
706 - return new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref());
706 + new_sg_binary(out, base_indent, build_self, colon.span.start(), ":", x.ty.as_ref())
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_type.rs#L127
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_type.rs:127:23
|
127 | node.seg(out, &seg.value().ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `seg.value().ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1174
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1174:29
|
1174 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1169
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1169:29
|
1169 | sg.seg(out, &format!("{}::", x.ident));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}::", x.ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1151
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1151:29
|
1151 | sg.seg(out, &format!("{}: ", n));
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", n)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L1033
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:1033:33
|
1033 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L853
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:853:33
|
853 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L821
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:821:33
|
821 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L806
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:806:37
|
806 | sg.seg(out, &format!(" {}", n));
| ^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" {}", n)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L669
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:669:33
|
669 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L648
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:648:33
|
648 | sg.seg(out, &x.ident.to_string());
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `x.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L190
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:190:33
|
190 | sg.seg(out, &l.semi_token.to_token_stream());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `l.semi_token.to_token_stream()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L182
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:182:49
|
182 | ... sg.seg(out, &format!(" {} ", t.to_token_stream()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" {} ", t.to_token_stream())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_statement.rs#L169
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_statement.rs:169:33
|
169 | sg.seg(out, &format!("{} ", l.let_token.to_token_stream()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{} ", l.let_token.to_token_stream())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
this loop could be written as a `while let` loop:
crates/genemichaels-lib/src/sg_pat.rs#L68
warning: this loop could be written as a `while let` loop
--> crates/genemichaels-lib/src/sg_pat.rs:68:29
|
68 | / ... loop {
69 | | ... let t = match at.1.as_ref() {
70 | | ... Pat::Tuple(t) => t,
71 | | ... _ => break,
... |
114 | | ... return sg0.build(out);
115 | | ... };
| |_______________________^ help: try: `while let Pat::Tuple(t) = at.1.as_ref() { .. }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop
= note: `#[warn(clippy::while_let_loop)]` on by default
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_general.rs#L580
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_general.rs:580:17
|
580 | / return Some(Whitespace {
581 | | loc: w.loc,
582 | | mode: WhitespaceMode::Comment(c),
583 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
580 ~ Some(Whitespace {
581 + loc: w.loc,
582 + mode: WhitespaceMode::Comment(c),
583 ~ })
|
|
unneeded `return` statement:
crates/genemichaels-lib/src/sg_general.rs#L574
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/sg_general.rs:574:17
|
574 | / return Some(Whitespace {
575 | | loc: w.loc,
576 | | mode: WhitespaceMode::BlankLines(use_lines),
577 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
574 ~ Some(Whitespace {
575 + loc: w.loc,
576 + mode: WhitespaceMode::BlankLines(use_lines),
577 ~ })
|
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L539
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:539:41
|
539 | ... sg.seg(out, &l.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `l.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L527
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:527:45
|
527 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L515
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:515:45
|
515 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L510
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:510:45
|
510 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L505
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:505:45
|
505 | ... sg.seg(out, &p.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `p.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_general.rs#L493
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_general.rs:493:41
|
493 | ... sg.seg(out, &i.to_string());
| ^^^^^^^^^^^^^^ help: change this to: `i.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L848
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:848:33
|
848 | sg.seg(out, &e.op.to_token_stream().to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `e.op.to_token_stream().to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L440
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:440:45
|
440 | ... sg.seg(out, &format!("{}: ", l.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", l.name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L296
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:296:37
|
296 | sg.seg(out, &format!(" '{}", l.ident))
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(" '{}", l.ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
crates/genemichaels-lib/src/sg_expr.rs#L271
warning: the borrowed expression implements the required traits
--> crates/genemichaels-lib/src/sg_expr.rs:271:37
|
271 | sg.seg(out, &format!("{}: ", l.name));
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: ", l.name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
accessing first element with `children.get(0)`:
crates/genemichaels-lib/src/sg_expr.rs#L173
warning: accessing first element with `children.get(0)`
--> crates/genemichaels-lib/src/sg_expr.rs:173:48
|
173 | sg.child(build_child(out, base_indent, children.get(0).unwrap()));
| ^^^^^^^^^^^^^^^ help: try: `children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L981
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:981:29
|
981 | unicode_len(&prefix),
| ^^^^^^^ help: change this to: `prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L917
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:917:43
|
917 | Node::InlineCode(t) => if get_splits(&t.value).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t.value).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L912
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:912:37
|
912 | Node::Text(t) => if get_splits(&t.value).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t.value).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
accessing first element with `x.children.get(0)`:
crates/genemichaels-lib/src/whitespace.rs#L910
warning: accessing first element with `x.children.get(0)`
--> crates/genemichaels-lib/src/whitespace.rs:910:17
|
910 | x.children.get(0)
| ^^^^^^^^^^^^^^^^^ help: try: `x.children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L865
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:865:24
|
865 | if get_splits(&t).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L857
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:857:24
|
857 | if get_splits(&t).first().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&t).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
|
accessing first element with `x.children.get(0)`:
crates/genemichaels-lib/src/whitespace.rs#L853
warning: accessing first element with `x.children.get(0)`
--> crates/genemichaels-lib/src/whitespace.rs:853:17
|
853 | x.children.get(0)
| ^^^^^^^^^^^^^^^^^ help: try: `x.children.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
|
unnecessary use of `first().is_some()` to check if slice is not empty:
crates/genemichaels-lib/src/whitespace.rs#L821
warning: unnecessary use of `first().is_some()` to check if slice is not empty
--> crates/genemichaels-lib/src/whitespace.rs:821:20
|
821 | match (get_splits(&join_lines(&alt)).first().is_some(), &x.title) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace this with: `!get_splits(&join_lines(&alt)).is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
= note: `#[warn(clippy::unnecessary_first_then_check)]` on by default
|
this expression borrows a value the compiler would automatically borrow:
crates/genemichaels-lib/src/whitespace.rs#L627
warning: this expression borrows a value the compiler would automatically borrow
--> crates/genemichaels-lib/src/whitespace.rs:627:70
|
627 | write_forward_breaks(state, &mut s, out, max_len, false, (&text[b..]).to_string(), b, breaks);
| ^^^^^^^^^^^^ help: change this to: `text[b..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
crates/genemichaels-lib/src/whitespace.rs#L612
warning: this expression borrows a value the compiler would automatically borrow
--> crates/genemichaels-lib/src/whitespace.rs:612:17
|
612 | (&text[found.writable..]).to_string(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `text[found.writable..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L565
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:565:40
|
565 | state.line_buffer.push_str(&text);
| ^^^^^ help: change this to: `text`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/genemichaels-lib/src/whitespace.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/genemichaels-lib/src/whitespace.rs:550:50
|
550 | writable: if width + unicode_len(&text) > max_len {
| ^^^^^ help: change this to: `text`
|
= 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:
crates/genemichaels-lib/src/whitespace.rs#L549
warning: unneeded `return` statement
--> crates/genemichaels-lib/src/whitespace.rs:549:13
|
549 | / return FoundWritableLen {
550 | | writable: if width + unicode_len(&text) > max_len {
551 | | writable
552 | | } else {
... |
556 | | next_break: None,
557 | | };
| |_____________^
|
= 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`
|
549 ~ FoundWritableLen {
550 + writable: if width + unicode_len(&text) > max_len {
551 + writable
552 + } else {
553 + text.len()
554 + },
555 + previous_break: previous_break,
556 + next_break: None,
557 ~ }
|
|
calling `push_str()` using a single-character string literal:
crates/genemichaels-lib/src/whitespace.rs#L259
warning: calling `push_str()` using a single-character string literal
--> crates/genemichaels-lib/src/whitespace.rs:259:25
|
259 | previous_comment.lines.push_str("\n");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `previous_comment.lines.push('\n')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
= note: `#[warn(clippy::single_char_add_str)]` on by default
|
use of `or_insert` to construct default value:
crates/genemichaels-lib/src/whitespace.rs#L240
warning: use of `or_insert` to construct default value
--> crates/genemichaels-lib/src/whitespace.rs:240:79
|
240 | let whitespaces = self.whitespaces.entry(HashLineColumn(end)).or_insert(vec![]);
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
useless conversion to the same type: `&str`:
crates/genemichaels-lib/src/whitespace.rs#L183
warning: useless conversion to the same type: `&str`
--> crates/genemichaels-lib/src/whitespace.rs:183:65
|
183 | ... buffer.add(CommentMode::Normal, "".into());
| ^^^^^^^^^ help: consider removing `.into()`: `""`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
the following explicit lifetimes could be elided: 'a:
crates/genemichaels-lib/src/whitespace.rs#L74
warning: the following explicit lifetimes could be elided: 'a
--> crates/genemichaels-lib/src/whitespace.rs:74:10
|
74 | impl<'a> State<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
74 - impl<'a> State<'a> {
74 + impl State<'_> {
|
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/lib.rs#L856
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/lib.rs:856:9
|
856 | warnings: warnings,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `warnings`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/lib.rs#L854
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/lib.rs:854:9
|
854 | rendered: rendered,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `rendered`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L555
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:555:17
|
555 | previous_break: previous_break,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L543
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:543:25
|
543 | next_break: next_break,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `next_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L542
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:542:25
|
542 | previous_break: previous_break,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `previous_break`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L541
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:541:25
|
541 | writable: writable,
| ^^^^^^^^^^^^^^^^^^ help: replace it with: `writable`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L465
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:465:13
|
465 | base_prefix_len: base_prefix_len,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_prefix_len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L312
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:312:9
|
312 | line_lookup: line_lookup,
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `line_lookup`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L311
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:311:9
|
311 | keep_max_blank_lines: keep_max_blank_lines,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `keep_max_blank_lines`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
crates/genemichaels-lib/src/whitespace.rs#L310
warning: redundant field names in struct initialization
--> crates/genemichaels-lib/src/whitespace.rs:310:9
|
310 | source: source,
| ^^^^^^^^^^^^^^ help: replace it with: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`:
crates/genemichaels-lib/src/lib.rs#L5
warning: lint `clippy::derive_hash_xor_eq` has been renamed to `clippy::derived_hash_with_manual_eq`
--> crates/genemichaels-lib/src/lib.rs:5:5
|
5 | clippy::derive_hash_xor_eq
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `clippy::derived_hash_with_manual_eq`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
Clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Audit
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|