Skip to content

chore: Release

chore: Release #167

Triggered via push November 9, 2024 18:57
Status Success
Total duration 4m 14s
Artifacts

rust.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

72 warnings
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
using `clone` on type `FormatConfig` which implements the `Copy` trait: crates/genemichaels-lib/src/lib.rs#L526
warning: using `clone` on type `FormatConfig` which implements the `Copy` trait --> crates/genemichaels-lib/src/lib.rs:526:17 | 526 | 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
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#L705
warning: unneeded `return` statement --> crates/genemichaels-lib/src/sg_type.rs:705:25 | 705 | 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` | 705 - return build_self(out, base_indent); 705 + build_self(out, base_indent) |
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
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
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
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
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
redundant field names in struct initialization: crates/genemichaels-lib/src/lib.rs#L827
warning: redundant field names in struct initialization --> crates/genemichaels-lib/src/lib.rs:827:9 | 827 | 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#L825
warning: redundant field names in struct initialization --> crates/genemichaels-lib/src/lib.rs:825:9 | 825 | 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
Test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Audit
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Audit
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Audit
Failed to download action 'https://api.github.com/repos/actions/checkout/tarball/50fbc622fc4ef5163becd7fab6573eac35f8462e'. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
Audit
Back off 16.837 seconds before retry.
Audit
Failed to download action 'https://api.github.com/repos/actions/checkout/tarball/50fbc622fc4ef5163becd7fab6573eac35f8462e'. Error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
Audit
Back off 15.762 seconds before retry.