[INFO] fetching crate difftastic-oc 0.23.0... [INFO] linting difftastic-oc-0.23.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate difftastic-oc 0.23.0 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate difftastic-oc 0.23.0 [INFO] finished tweaking crates.io crate difftastic-oc 0.23.0 [INFO] tweaked toml for crates.io crate difftastic-oc 0.23.0 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate difftastic-oc 0.23.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate difftastic-oc 0.23.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded typed-arena v2.0.1 [INFO] [stderr] Downloaded archery v0.4.0 [INFO] [stderr] Downloaded wu-diff v0.1.2 [INFO] [stderr] Downloaded term_size v0.3.2 [INFO] [stderr] Downloaded ctor v0.1.21 [INFO] [stderr] Downloaded radix-heap v0.4.2 [INFO] [stderr] Downloaded mimalloc v0.1.27 [INFO] [stderr] Downloaded output_vt100 v0.1.2 [INFO] [stderr] Downloaded owo-colors v3.2.0 [INFO] [stderr] Downloaded quote v1.0.13 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.5 [INFO] [stderr] Downloaded diff v0.1.12 [INFO] [stderr] Downloaded const_format v0.2.22 [INFO] [stderr] Downloaded crossbeam-channel v0.5.1 [INFO] [stderr] Downloaded pretty_assertions v1.0.0 [INFO] [stderr] Downloaded tree-sitter v0.20.5 [INFO] [stderr] Downloaded rpds v0.11.0 [INFO] [stderr] Downloaded clap v3.0.13 [INFO] [stderr] Downloaded syn v1.0.84 [INFO] [stderr] Downloaded libc v0.2.112 [INFO] [stderr] Downloaded libmimalloc-sys v0.1.23 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c529190e1a1611f17166bf087e5b89de9b20baacd59fbfbaa34615a2d9e05023 [INFO] running `Command { std: "docker" "start" "-a" "c529190e1a1611f17166bf087e5b89de9b20baacd59fbfbaa34615a2d9e05023", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c529190e1a1611f17166bf087e5b89de9b20baacd59fbfbaa34615a2d9e05023", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c529190e1a1611f17166bf087e5b89de9b20baacd59fbfbaa34615a2d9e05023", kill_on_drop: false }` [INFO] [stdout] c529190e1a1611f17166bf087e5b89de9b20baacd59fbfbaa34615a2d9e05023 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 776d1faf7add198b7dc92b64c53c1c71287c8ff3198edc471e45ab3595073840 [INFO] running `Command { std: "docker" "start" "-a" "776d1faf7add198b7dc92b64c53c1c71287c8ff3198edc471e45ab3595073840", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.112 [INFO] [stderr] Compiling crossbeam-utils v0.8.7 [INFO] [stderr] Compiling memoffset v0.6.5 [INFO] [stderr] Compiling quote v1.0.13 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling rayon-core v1.9.1 [INFO] [stderr] Compiling scopeguard v1.1.0 [INFO] [stderr] Compiling syn v1.0.84 [INFO] [stderr] Compiling rayon v1.5.1 [INFO] [stderr] Checking regex-syntax v0.6.25 [INFO] [stderr] Compiling serde_derive v1.0.136 [INFO] [stderr] Compiling libmimalloc-sys v0.1.23 [INFO] [stderr] Compiling either v1.6.1 [INFO] [stderr] Compiling serde v1.0.136 [INFO] [stderr] Compiling tree-sitter v0.20.5 [INFO] [stderr] Compiling serde_json v1.0.79 [INFO] [stderr] Checking archery v0.4.0 [INFO] [stderr] Checking itoa v1.0.1 [INFO] [stderr] Checking ryu v1.0.9 [INFO] [stderr] Checking itertools v0.10.3 [INFO] [stderr] Checking rpds v0.11.0 [INFO] [stderr] Checking ansi_term v0.12.1 [INFO] [stderr] Checking diff v0.1.12 [INFO] [stderr] Checking owo-colors v3.2.0 [INFO] [stderr] Checking wu-diff v0.1.2 [INFO] [stderr] Checking typed-arena v2.0.1 [INFO] [stderr] Checking rustc-hash v1.1.0 [INFO] [stderr] Checking radix-heap v0.4.2 [INFO] [stderr] Checking pretty_assertions v1.0.0 [INFO] [stderr] Compiling const_format_proc_macros v0.2.22 [INFO] [stderr] Compiling crossbeam-channel v0.5.1 [INFO] [stderr] Compiling num_cpus v1.13.1 [INFO] [stderr] Compiling crossbeam-deque v0.8.1 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking term_size v0.3.2 [INFO] [stderr] Checking clap v3.0.13 [INFO] [stderr] Checking mimalloc v0.1.27 [INFO] [stderr] Checking const_format v0.2.22 [INFO] [stderr] Checking regex v1.5.4 [INFO] [stderr] Checking env_logger v0.7.1 [INFO] [stderr] Checking pretty_env_logger v0.4.0 [INFO] [stderr] Compiling difftastic-oc v0.23.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: struct `LinePosition` is never constructed [INFO] [stdout] --> src/lines.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct LinePosition { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/context.rs:136:68 [INFO] [stdout] | [INFO] [stdout] 136 | let opposite_lines = res.entry(self_span.line).or_insert_with(HashSet::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/context.rs:145:63 [INFO] [stdout] | [INFO] [stdout] 145 | let opposite_lines = res.entry(self_pos.line).or_insert_with(HashSet::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/context.rs:293:25 [INFO] [stdout] | [INFO] [stdout] 293 | / all_opposites = all_opposites [INFO] [stdout] 294 | | .into_iter() [INFO] [stdout] 295 | | .filter(|x| *x > prev_max_opposite) [INFO] [stdout] 296 | | .collect() [INFO] [stdout] | |______________________________________^ help: consider calling `.retain()` instead: `all_opposites.retain(|x| *x > prev_max_opposite)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/context.rs:403:16 [INFO] [stdout] | [INFO] [stdout] 403 | .chain(after_lines.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 403 - .chain(after_lines.into_iter()) [INFO] [stdout] 403 + .chain(after_lines) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/dijkstra.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | let mut predecessors: FxHashMap = FxHashMap::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `Vertex<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Option<&Syntax<'_>>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `&Syntax<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Syntax<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `SyntaxInfo<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell>>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell>>`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: `#[warn(clippy::mutable_key_type)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/graph.rs:383:36 [INFO] [stdout] | [INFO] [stdout] 383 | let depth_difference = (lhs_syntax.num_ancestors() as i32 [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 384 | | - rhs_syntax.num_ancestors() as i32) [INFO] [stdout] 385 | | .abs() as u32; [INFO] [stdout] | |_____________________________^ help: replace with: `(lhs_syntax.num_ancestors() as i32 - rhs_syntax.num_ancestors() as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs_children.get(0)` [INFO] [stdout] --> src/graph.rs:418:32 [INFO] [stdout] | [INFO] [stdout] 418 | let lhs_next = lhs_children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `lhs_children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs_children.get(0)` [INFO] [stdout] --> src/graph.rs:419:32 [INFO] [stdout] | [INFO] [stdout] 419 | let rhs_next = rhs_children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `rhs_children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/graph.rs:424:40 [INFO] [stdout] | [INFO] [stdout] 424 | let depth_difference = (lhs_syntax.num_ancestors() as i32 [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 425 | | - rhs_syntax.num_ancestors() as i32) [INFO] [stdout] 426 | | .abs() as u32; [INFO] [stdout] | |_________________________________^ help: replace with: `(lhs_syntax.num_ancestors() as i32 - rhs_syntax.num_ancestors() as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `children.get(0)` [INFO] [stdout] --> src/graph.rs:501:32 [INFO] [stdout] | [INFO] [stdout] 501 | let lhs_next = children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `children.get(0)` [INFO] [stdout] --> src/graph.rs:562:32 [INFO] [stdout] | [INFO] [stdout] 562 | let rhs_next = children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LHS` contains a capitalized acronym [INFO] [stdout] --> src/hunks.rs:349:5 [INFO] [stdout] | [INFO] [stdout] 349 | LHS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Lhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RHS` contains a capitalized acronym [INFO] [stdout] --> src/hunks.rs:350:5 [INFO] [stdout] | [INFO] [stdout] 350 | RHS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/inline.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn print( [INFO] [stdout] 13 | | lhs_src: &str, [INFO] [stdout] 14 | | rhs_src: &str, [INFO] [stdout] 15 | | lhs_positions: &[MatchedPos], [INFO] [stdout] ... | [INFO] [stdout] 21 | | background: BackgroundColor, [INFO] [stdout] 22 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/lines.rs:75:20 [INFO] [stdout] | [INFO] [stdout] 75 | fn from_offset(&self, offset: usize) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/lines.rs:92:25 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn from_offsets(&self, region_start: usize, region_end: usize) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/lines.rs:103:28 [INFO] [stdout] | [INFO] [stdout] 103 | start_col: if line_start > region_start { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 104 | | 0 [INFO] [stdout] 105 | | } else { [INFO] [stdout] 106 | | region_start - line_start [INFO] [stdout] 107 | | }, [INFO] [stdout] | |_________________^ help: replace it with: `region_start.saturating_sub(line_start)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/lines.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | &self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/options.rs:90:23 [INFO] [stdout] | [INFO] [stdout] 90 | ...help(concat!("Use a text diff if the number of syntax nodes exceeds this number. Overrides $DFT_NODE_LIMIT if present.")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"Use a text diff if the number of syntax nodes exceeds this number. Overrides $DFT_NODE_LIMIT if present."` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] = note: `#[warn(clippy::useless_concat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/options.rs:99:23 [INFO] [stdout] | [INFO] [stdout] 99 | .help(concat!("Use a text diff if either input file exceeds this size. Overrides $DFT_BYTE_LIMIT if present.")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"Use a text diff if either input file exceeds this size. Overrides $DFT_BYTE_LIMIT if present."` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/side_by_side.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | / fn display_line_nums( [INFO] [stdout] 108 | | lhs_line_num: Option, [INFO] [stdout] 109 | | rhs_line_num: Option, [INFO] [stdout] 110 | | source_dims: &SourceDimensions, [INFO] [stdout] ... | [INFO] [stdout] 116 | | prev_rhs_line_num: Option, [INFO] [stdout] 117 | | ) -> (String, String) { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/side_by_side.rs:246:50 [INFO] [stdout] | [INFO] [stdout] 246 | let styles = lhs_styles.entry(span.line).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/side_by_side.rs:254:50 [INFO] [stdout] | [INFO] [stdout] 254 | let styles = rhs_styles.entry(span.line).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/side_by_side.rs:400:34 [INFO] [stdout] | [INFO] [stdout] 400 | if no_lhs_changes && !std::env::var("DFT_SHOW_BOTH").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::env::var("DFT_SHOW_BOTH").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/side_by_side.rs:420:41 [INFO] [stdout] | [INFO] [stdout] 420 | } else if no_rhs_changes && !std::env::var("DFT_SHOW_BOTH").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::env::var("DFT_SHOW_BOTH").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/side_by_side.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / pub fn print( [INFO] [stdout] 286 | | hunks: &[Hunk], [INFO] [stdout] 287 | | display_width: usize, [INFO] [stdout] 288 | | use_color: bool, [INFO] [stdout] ... | [INFO] [stdout] 295 | | rhs_mps: &[MatchedPos], [INFO] [stdout] 296 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/sliders.rs:132:29 [INFO] [stdout] | [INFO] [stdout] 132 | let mut r = if let Some(r) = region { r } else { vec![] }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `region.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `position.get(0)` [INFO] [stdout] --> src/tree_sitter_parser.rs:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | position.get(0), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `position.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs_section_nodes.get(0)` [INFO] [stdout] --> src/main.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | lhs_section_nodes.get(0).copied(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lhs_section_nodes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs_section_nodes.get(0)` [INFO] [stdout] --> src/main.rs:291:25 [INFO] [stdout] | [INFO] [stdout] 291 | rhs_section_nodes.get(0).copied(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs_section_nodes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.borrow()` on a reference in this situation does nothing [INFO] [stdout] --> src/guess_language.rs:85:63 [INFO] [stdout] | [INFO] [stdout] 85 | let lang = match mode_name.to_ascii_lowercase().trim().borrow() { [INFO] [stdout] | ^^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Borrow`, so calling `borrow` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LinePosition` is never constructed [INFO] [stdout] --> src/lines.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct LinePosition { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/context.rs:136:68 [INFO] [stdout] | [INFO] [stdout] 136 | let opposite_lines = res.entry(self_span.line).or_insert_with(HashSet::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/context.rs:145:63 [INFO] [stdout] | [INFO] [stdout] 145 | let opposite_lines = res.entry(self_pos.line).or_insert_with(HashSet::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/context.rs:293:25 [INFO] [stdout] | [INFO] [stdout] 293 | / all_opposites = all_opposites [INFO] [stdout] 294 | | .into_iter() [INFO] [stdout] 295 | | .filter(|x| *x > prev_max_opposite) [INFO] [stdout] 296 | | .collect() [INFO] [stdout] | |______________________________________^ help: consider calling `.retain()` instead: `all_opposites.retain(|x| *x > prev_max_opposite)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/context.rs:403:16 [INFO] [stdout] | [INFO] [stdout] 403 | .chain(after_lines.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 403 - .chain(after_lines.into_iter()) [INFO] [stdout] 403 + .chain(after_lines) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: mutable key type [INFO] [stdout] --> src/dijkstra.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | let mut predecessors: FxHashMap = FxHashMap::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: ... because it contains `Vertex<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Option<&Syntax<'_>>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `&Syntax<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Syntax<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `SyntaxInfo<'_>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `Cell>>`, which has interior mutability [INFO] [stdout] = note: ... because it contains `UnsafeCell>>`, which has interior mutability [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type [INFO] [stdout] = note: `#[warn(clippy::mutable_key_type)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:213:33 [INFO] [stdout] | [INFO] [stdout] 213 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:213:54 [INFO] [stdout] | [INFO] [stdout] 213 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:255:33 [INFO] [stdout] | [INFO] [stdout] 255 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:255:54 [INFO] [stdout] | [INFO] [stdout] 255 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:301:33 [INFO] [stdout] | [INFO] [stdout] 301 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:301:54 [INFO] [stdout] | [INFO] [stdout] 301 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:340:33 [INFO] [stdout] | [INFO] [stdout] 340 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:340:54 [INFO] [stdout] | [INFO] [stdout] 340 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:377:33 [INFO] [stdout] | [INFO] [stdout] 377 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:377:54 [INFO] [stdout] | [INFO] [stdout] 377 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:415:33 [INFO] [stdout] | [INFO] [stdout] 415 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:415:54 [INFO] [stdout] | [INFO] [stdout] 415 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:498:33 [INFO] [stdout] | [INFO] [stdout] 498 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:498:54 [INFO] [stdout] | [INFO] [stdout] 498 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:534:33 [INFO] [stdout] | [INFO] [stdout] 534 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:534:54 [INFO] [stdout] | [INFO] [stdout] 534 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:565:33 [INFO] [stdout] | [INFO] [stdout] 565 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:565:54 [INFO] [stdout] | [INFO] [stdout] 565 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:604:33 [INFO] [stdout] | [INFO] [stdout] 604 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `lhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs.get(0)` [INFO] [stdout] --> src/dijkstra.rs:604:54 [INFO] [stdout] | [INFO] [stdout] 604 | let start = Vertex::new(lhs.get(0).copied(), rhs.get(0).copied()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/graph.rs:383:36 [INFO] [stdout] | [INFO] [stdout] 383 | let depth_difference = (lhs_syntax.num_ancestors() as i32 [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 384 | | - rhs_syntax.num_ancestors() as i32) [INFO] [stdout] 385 | | .abs() as u32; [INFO] [stdout] | |_____________________________^ help: replace with: `(lhs_syntax.num_ancestors() as i32 - rhs_syntax.num_ancestors() as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs_children.get(0)` [INFO] [stdout] --> src/graph.rs:418:32 [INFO] [stdout] | [INFO] [stdout] 418 | let lhs_next = lhs_children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `lhs_children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs_children.get(0)` [INFO] [stdout] --> src/graph.rs:419:32 [INFO] [stdout] | [INFO] [stdout] 419 | let rhs_next = rhs_children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `rhs_children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to u32 [INFO] [stdout] --> src/graph.rs:424:40 [INFO] [stdout] | [INFO] [stdout] 424 | let depth_difference = (lhs_syntax.num_ancestors() as i32 [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 425 | | - rhs_syntax.num_ancestors() as i32) [INFO] [stdout] 426 | | .abs() as u32; [INFO] [stdout] | |_________________________________^ help: replace with: `(lhs_syntax.num_ancestors() as i32 - rhs_syntax.num_ancestors() as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `children.get(0)` [INFO] [stdout] --> src/graph.rs:501:32 [INFO] [stdout] | [INFO] [stdout] 501 | let lhs_next = children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `children.get(0)` [INFO] [stdout] --> src/graph.rs:562:32 [INFO] [stdout] | [INFO] [stdout] 562 | let rhs_next = children.get(0).copied(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `children.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LHS` contains a capitalized acronym [INFO] [stdout] --> src/hunks.rs:349:5 [INFO] [stdout] | [INFO] [stdout] 349 | LHS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Lhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RHS` contains a capitalized acronym [INFO] [stdout] --> src/hunks.rs:350:5 [INFO] [stdout] | [INFO] [stdout] 350 | RHS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/inline.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn print( [INFO] [stdout] 13 | | lhs_src: &str, [INFO] [stdout] 14 | | rhs_src: &str, [INFO] [stdout] 15 | | lhs_positions: &[MatchedPos], [INFO] [stdout] ... | [INFO] [stdout] 21 | | background: BackgroundColor, [INFO] [stdout] 22 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/lines.rs:75:20 [INFO] [stdout] | [INFO] [stdout] 75 | fn from_offset(&self, offset: usize) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/lines.rs:92:25 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn from_offsets(&self, region_start: usize, region_end: usize) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> src/lines.rs:103:28 [INFO] [stdout] | [INFO] [stdout] 103 | start_col: if line_start > region_start { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 104 | | 0 [INFO] [stdout] 105 | | } else { [INFO] [stdout] 106 | | region_start - line_start [INFO] [stdout] 107 | | }, [INFO] [stdout] | |_________________^ help: replace it with: `region_start.saturating_sub(line_start)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/lines.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | &self, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/options.rs:90:23 [INFO] [stdout] | [INFO] [stdout] 90 | ...help(concat!("Use a text diff if the number of syntax nodes exceeds this number. Overrides $DFT_NODE_LIMIT if present.")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"Use a text diff if the number of syntax nodes exceeds this number. Overrides $DFT_NODE_LIMIT if present."` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] = note: `#[warn(clippy::useless_concat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded use of `concat!` macro [INFO] [stdout] --> src/options.rs:99:23 [INFO] [stdout] | [INFO] [stdout] 99 | .help(concat!("Use a text diff if either input file exceeds this size. Overrides $DFT_BYTE_LIMIT if present.")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"Use a text diff if either input file exceeds this size. Overrides $DFT_BYTE_LIMIT if present."` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/side_by_side.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | / fn display_line_nums( [INFO] [stdout] 108 | | lhs_line_num: Option, [INFO] [stdout] 109 | | rhs_line_num: Option, [INFO] [stdout] 110 | | source_dims: &SourceDimensions, [INFO] [stdout] ... | [INFO] [stdout] 116 | | prev_rhs_line_num: Option, [INFO] [stdout] 117 | | ) -> (String, String) { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/side_by_side.rs:246:50 [INFO] [stdout] | [INFO] [stdout] 246 | let styles = lhs_styles.entry(span.line).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/side_by_side.rs:254:50 [INFO] [stdout] | [INFO] [stdout] 254 | let styles = rhs_styles.entry(span.line).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/side_by_side.rs:400:34 [INFO] [stdout] | [INFO] [stdout] 400 | if no_lhs_changes && !std::env::var("DFT_SHOW_BOTH").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::env::var("DFT_SHOW_BOTH").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/side_by_side.rs:420:41 [INFO] [stdout] | [INFO] [stdout] 420 | } else if no_rhs_changes && !std::env::var("DFT_SHOW_BOTH").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::env::var("DFT_SHOW_BOTH").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/side_by_side.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / pub fn print( [INFO] [stdout] 286 | | hunks: &[Hunk], [INFO] [stdout] 287 | | display_width: usize, [INFO] [stdout] 288 | | use_color: bool, [INFO] [stdout] ... | [INFO] [stdout] 295 | | rhs_mps: &[MatchedPos], [INFO] [stdout] 296 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/sliders.rs:132:29 [INFO] [stdout] | [INFO] [stdout] 132 | let mut r = if let Some(r) = region { r } else { vec![] }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `region.unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `position.get(0)` [INFO] [stdout] --> src/tree_sitter_parser.rs:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | position.get(0), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `position.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lhs_section_nodes.get(0)` [INFO] [stdout] --> src/main.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | lhs_section_nodes.get(0).copied(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lhs_section_nodes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rhs_section_nodes.get(0)` [INFO] [stdout] --> src/main.rs:291:25 [INFO] [stdout] | [INFO] [stdout] 291 | rhs_section_nodes.get(0).copied(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rhs_section_nodes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.borrow()` on a reference in this situation does nothing [INFO] [stdout] --> src/guess_language.rs:85:63 [INFO] [stdout] | [INFO] [stdout] 85 | let lang = match mode_name.to_ascii_lowercase().trim().borrow() { [INFO] [stdout] | ^^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Borrow`, so calling `borrow` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 28.10s [INFO] running `Command { std: "docker" "inspect" "776d1faf7add198b7dc92b64c53c1c71287c8ff3198edc471e45ab3595073840", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "776d1faf7add198b7dc92b64c53c1c71287c8ff3198edc471e45ab3595073840", kill_on_drop: false }` [INFO] [stdout] 776d1faf7add198b7dc92b64c53c1c71287c8ff3198edc471e45ab3595073840