[INFO] fetching crate dagre_rust 0.0.5... [INFO] linting dagre_rust-0.0.5 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate dagre_rust 0.0.5 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate dagre_rust 0.0.5 [INFO] finished tweaking crates.io crate dagre_rust 0.0.5 [INFO] tweaked toml for crates.io crate dagre_rust 0.0.5 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate dagre_rust 0.0.5 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 2 packages to latest compatible versions [INFO] [stderr] Adding graphlib_rust v0.0.2 (available: v0.0.4) [INFO] [stderr] Adding ordered_hashmap v0.0.3 (available: v0.0.4) [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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ordered_hashmap v0.0.3 [INFO] [stderr] Downloaded graphlib_rust v0.0.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] e41b4f4388019d8427da4e327f082634d065597e1139226c8cc4b568a2f4a928 [INFO] running `Command { std: "docker" "start" "-a" "e41b4f4388019d8427da4e327f082634d065597e1139226c8cc4b568a2f4a928", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e41b4f4388019d8427da4e327f082634d065597e1139226c8cc4b568a2f4a928", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e41b4f4388019d8427da4e327f082634d065597e1139226c8cc4b568a2f4a928", kill_on_drop: false }` [INFO] [stdout] e41b4f4388019d8427da4e327f082634d065597e1139226c8cc4b568a2f4a928 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] ce941b9365d085f59ff5a40b461e861a78d0dec6e7dd288ed492a7d1ccc71383 [INFO] running `Command { std: "docker" "start" "-a" "ce941b9365d085f59ff5a40b461e861a78d0dec6e7dd288ed492a7d1ccc71383", kill_on_drop: false }` [INFO] [stderr] Checking ordered_hashmap v0.0.3 [INFO] [stderr] Checking graphlib_rust v0.0.2 [INFO] [stderr] Checking dagre_rust v0.0.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: value assigned to `edge` is never read [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:43:32 [INFO] [stdout] | [INFO] [stdout] 43 | let mut edge: Option = None; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `delta` is never read [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:44:32 [INFO] [stdout] | [INFO] [stdout] 44 | let mut delta: Option = None; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e1` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:105:15 [INFO] [stdout] | [INFO] [stdout] 105 | .min_by(|(e1, e1_), (e2, e2_)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_e1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e2` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:105:26 [INFO] [stdout] | [INFO] [stdout] 105 | .min_by(|(e1, e1_), (e2, e2_)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_e2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:104:15 [INFO] [stdout] | [INFO] [stdout] 104 | .filter(|(e, e_)| e_.is_some()) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `edge` is never read [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:43:32 [INFO] [stdout] | [INFO] [stdout] 43 | let mut edge: Option = None; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `delta` is never read [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:44:32 [INFO] [stdout] | [INFO] [stdout] 44 | let mut delta: Option = None; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e1` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:105:15 [INFO] [stdout] | [INFO] [stdout] 105 | .min_by(|(e1, e1_), (e2, e2_)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_e1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e2` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:105:26 [INFO] [stdout] | [INFO] [stdout] 105 | .min_by(|(e1, e1_), (e2, e2_)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_e2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:104:15 [INFO] [stdout] | [INFO] [stdout] 104 | .filter(|(e, e_)| e_.is_some()) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `prev_north_pos` is assigned to, but never used [INFO] [stdout] --> src/layout/position/bk.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let mut prev_north_pos = -1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_prev_north_pos` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `prev_north_pos` is never read [INFO] [stdout] --> src/layout/position/bk.rs:123:15 [INFO] [stdout] | [INFO] [stdout] 123 | prev_north_pos = next_north_pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `delta` is never read [INFO] [stdout] --> src/layout/position/bk.rs:586:5 [INFO] [stdout] | [INFO] [stdout] 586 | delta = 0.0; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/layout/mod.rs:308:9 [INFO] [stdout] | [INFO] [stdout] 308 | let mut node = g.node_mut(&v).unwrap(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `prev_north_pos` is assigned to, but never used [INFO] [stdout] --> src/layout/position/bk.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let mut prev_north_pos = -1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_prev_north_pos` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/layout/acyclic.rs:9:85 [INFO] [stdout] | [INFO] [stdout] 9 | if graph_config.acyclicer.is_some() && graph_config.acyclicer.clone().unwrap() == "greedy".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"greedy"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `prev_north_pos` is never read [INFO] [stdout] --> src/layout/position/bk.rs:123:15 [INFO] [stdout] | [INFO] [stdout] 123 | prev_north_pos = next_north_pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/acyclic.rs:64:3 [INFO] [stdout] | [INFO] [stdout] 64 | return fas; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - return fas; [INFO] [stdout] 64 + fas [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/acyclic.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/acyclic.rs:70:8 [INFO] [stdout] | [INFO] [stdout] 70 | if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.reversed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/layout/nesting_graph.rs:39:3 [INFO] [stdout] | [INFO] [stdout] 39 | / if height > 0 { [INFO] [stdout] 40 | | height -= 1; [INFO] [stdout] 41 | | } [INFO] [stdout] | |___^ help: try: `height = height.saturating_sub(1);` [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: unneeded `return` statement [INFO] [stdout] --> src/layout/nesting_graph.rs:88:3 [INFO] [stdout] | [INFO] [stdout] 88 | return depths; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 88 - return depths; [INFO] [stdout] 88 + depths [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `border_bottom` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/nesting_graph.rs:136:22 [INFO] [stdout] | [INFO] [stdout] 135 | if border_bottom.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = border_bottom` [INFO] [stdout] 136 | child_bottom = border_bottom.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/nesting_graph.rs:93:6 [INFO] [stdout] | [INFO] [stdout] 93 | if children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:96:7 [INFO] [stdout] | [INFO] [stdout] 96 | graph_edge.minlen = Some(node_sep.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some(node_sep.clone()), weight: Some(0.0), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:95:7 [INFO] [stdout] | [INFO] [stdout] 95 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:96:32 [INFO] [stdout] | [INFO] [stdout] 96 | graph_edge.minlen = Some(node_sep.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*node_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:98:30 [INFO] [stdout] | [INFO] [stdout] 98 | let _ = graph.set_edge(&root, &node_id, Some(graph_edge), None); [INFO] [stdout] | ^^^^^ help: change this to: `root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:98:37 [INFO] [stdout] | [INFO] [stdout] 98 | let _ = graph.set_edge(&root, &node_id, Some(graph_edge), None); [INFO] [stdout] | ^^^^^^^^ help: change this to: `node_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/nesting_graph.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 100 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | _ct_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some(minlen.clone() as f32), weight: Some(this_weight.clone()), nesting_edge: Some(true), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | let mut _ct_graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | _cb_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some(minlen.clone() as f32), weight: Some(this_weight.clone()), nesting_edge: Some(true), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | let mut _cb_graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:129:32 [INFO] [stdout] | [INFO] [stdout] 129 | let mut this_weight: f32 = weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:139:27 [INFO] [stdout] | [INFO] [stdout] 139 | this_weight = 2.0 * weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:146:34 [INFO] [stdout] | [INFO] [stdout] 146 | _ct_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `minlen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:147:34 [INFO] [stdout] | [INFO] [stdout] 147 | _ct_graph_edge.weight = Some(this_weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `this_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:152:34 [INFO] [stdout] | [INFO] [stdout] 152 | _cb_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `minlen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | _cb_graph_edge.weight = Some(this_weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `this_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | graph_edge.minlen = Some((depths.get(node_id).cloned().unwrap_or(0) + height.clone()) as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some((depths.get(node_id).cloned().unwrap_or(0) + height.clone()) as f32), weight: Some(0.0), nesting_edge: Some(true), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:160:75 [INFO] [stdout] | [INFO] [stdout] 160 | graph_edge.minlen = Some((depths.get(node_id).cloned().unwrap_or(0) + height.clone()) as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:163:28 [INFO] [stdout] | [INFO] [stdout] 163 | let _ = graph.set_edge(&root, &top, Some(graph_edge), None); [INFO] [stdout] | ^^^^^ help: change this to: `root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/nesting_graph.rs:178:3 [INFO] [stdout] | [INFO] [stdout] 178 | return total_weights; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 178 - return total_weights; [INFO] [stdout] 178 + total_weights [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `delta` is never read [INFO] [stdout] --> src/layout/position/bk.rs:586:5 [INFO] [stdout] | [INFO] [stdout] 586 | delta = 0.0; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:192:10 [INFO] [stdout] | [INFO] [stdout] 192 | if edge_label.nesting_edge.clone().unwrap_or(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.nesting_edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | return UNIQUE_STARTER; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 11 - return UNIQUE_STARTER; [INFO] [stdout] 11 + UNIQUE_STARTER [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:29:3 [INFO] [stdout] | [INFO] [stdout] 29 | return node_id; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return node_id; [INFO] [stdout] 29 + node_id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:109:3 [INFO] [stdout] | [INFO] [stdout] 109 | return simplified; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 109 - return simplified; [INFO] [stdout] 109 + simplified [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | if g.children(&v).len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | if source.children(&v).len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `source.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/layout/mod.rs:308:9 [INFO] [stdout] | [INFO] [stdout] 308 | let mut node = g.node_mut(&v).unwrap(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:185:3 [INFO] [stdout] | [INFO] [stdout] 185 | / return layering.into_iter().map(|layer| -> Vec { [INFO] [stdout] 186 | | let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] 187 | | keys.sort(); [INFO] [stdout] 188 | | keys.iter().map(|key| -> String { [INFO] [stdout] 189 | | layer.get(key).cloned().unwrap() [INFO] [stdout] 190 | | }).collect() [INFO] [stdout] 191 | | }).collect(); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 185 ~ layering.into_iter().map(|layer| -> Vec { [INFO] [stdout] 186 + let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] 187 + keys.sort(); [INFO] [stdout] 188 + keys.iter().map(|key| -> String { [INFO] [stdout] 189 + layer.get(key).cloned().unwrap() [INFO] [stdout] 190 + }).collect() [INFO] [stdout] 191 ~ }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | graph.node(v).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph.node(v).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:226:16 [INFO] [stdout] | [INFO] [stdout] 226 | let rank = graph.node(v).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0) - offset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph.node(v).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:227:18 [INFO] [stdout] | [INFO] [stdout] 227 | layers.entry(rank.clone()).or_insert(vec![]).push(v.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:231:26 [INFO] [stdout] | [INFO] [stdout] 231 | let node_rank_factor = graph.graph().node_rank_factor.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph.graph().node_rank_factor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:233:8 [INFO] [stdout] | [INFO] [stdout] 233 | if vs.len() == 0 && i.clone() % node_rank_factor != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `vs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:233:25 [INFO] [stdout] | [INFO] [stdout] 233 | if vs.len() == 0 && i.clone() % node_rank_factor != 0 { [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:239:53 [INFO] [stdout] | [INFO] [stdout] 239 | node.rank = Some(node.rank.unwrap_or(0) + delta.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `delta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:261:3 [INFO] [stdout] | [INFO] [stdout] 261 | return add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 261 - return add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()); [INFO] [stdout] 261 + add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | g.node(v).as_ref().unwrap().rank.clone().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v).as_ref().unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:294:3 [INFO] [stdout] | [INFO] [stdout] 294 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 294 - return result; [INFO] [stdout] 294 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/util.rs:280:40 [INFO] [stdout] | [INFO] [stdout] 280 | pub fn partition(collection: &Vec, fn_: Box bool>) -> PartitionResponse { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 280 - pub fn partition(collection: &Vec, fn_: Box bool>) -> PartitionResponse { [INFO] [stdout] 280 + pub fn partition(collection: &[V], fn_: Box bool>) -> PartitionResponse { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | return rank; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - return rank; [INFO] [stdout] 47 + rank [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/util.rs:38:48 [INFO] [stdout] | [INFO] [stdout] 38 | dfs(&e.w, g, visited) - (g.edge_with_obj(&e).cloned().unwrap_or(GraphEdge::default()).minlen.unwrap_or(0.0).round() as i32) [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/layout/rank/util.rs:40:21 [INFO] [stdout] | [INFO] [stdout] 40 | let rank: i32 = ranks.iter().min().cloned().unwrap_or(0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ranks.iter().min().cloned().unwrap_or(0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/util.rs:44:32 [INFO] [stdout] | [INFO] [stdout] 44 | node_label.rank = Some(rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:63:3 [INFO] [stdout] | [INFO] [stdout] 63 | return w_rank - v_rank - minlen; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return w_rank - v_rank - minlen; [INFO] [stdout] 63 + w_rank - v_rank - minlen [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:51:22 [INFO] [stdout] | [INFO] [stdout] 51 | delta = Some(-1 * slack(g, &edge_)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-slack(g, &edge_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:88:3 [INFO] [stdout] | [INFO] [stdout] 88 | return t.node_count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 88 - return t.node_count(); [INFO] [stdout] 88 + t.node_count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | let _ = t.set_edge(&v, &w, Some(GraphEdge::default()), None); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `result` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:110:10 [INFO] [stdout] | [INFO] [stdout] 109 | if result.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = result` [INFO] [stdout] 110 | Some(result.unwrap().0.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:106:7 [INFO] [stdout] | [INFO] [stdout] 106 | return e1_.unwrap().cmp(&e2_.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 106 - return e1_.unwrap().cmp(&e2_.unwrap()); [INFO] [stdout] 106 + e1_.unwrap().cmp(&e2_.unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/layout/acyclic.rs:9:85 [INFO] [stdout] | [INFO] [stdout] 9 | if graph_config.acyclicer.is_some() && graph_config.acyclicer.clone().unwrap() == "greedy".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"greedy"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `f` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/network_simplex.rs:60:54 [INFO] [stdout] | [INFO] [stdout] 59 | if f.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = f` [INFO] [stdout] 60 | exchange_edges(&mut t, g, &e.clone().unwrap(), f.unwrap()); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:58:24 [INFO] [stdout] | [INFO] [stdout] 58 | f = enter_edge(&t, &g, &e.clone().unwrap()); [INFO] [stdout] | ^^ help: change this to: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/acyclic.rs:64:3 [INFO] [stdout] | [INFO] [stdout] 64 | return fas; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 64 - return fas; [INFO] [stdout] 64 + fas [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:86:34 [INFO] [stdout] | [INFO] [stdout] 86 | let edge_label_ = t.edge_mut(&child, &parent, None); [INFO] [stdout] | ^^^^^^ help: change this to: `child` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/acyclic.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:110:40 [INFO] [stdout] | [INFO] [stdout] 110 | graph_edge = g.edge_mut(&parent, &child, None); [INFO] [stdout] | ^^^^^^ help: change this to: `child` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:131:40 [INFO] [stdout] | [INFO] [stdout] 131 | let out_cut_value = t.edge(&child, &other, None) [INFO] [stdout] | ^^^^^^ help: change this to: `child` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `root_` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/network_simplex.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 151 | if root_.is_some() { [INFO] [stdout] | ------------------ help: try: `if let Some() = root_` [INFO] [stdout] 152 | root = root_.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | let low = next_lim_.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim_` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:160:22 [INFO] [stdout] | [INFO] [stdout] 160 | let mut next_lim = next_lim_.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim_` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:167:54 [INFO] [stdout] | [INFO] [stdout] 167 | next_lim = dfs_assign_low_lim(tree, visited, next_lim.clone(), &w, Some(v)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:175:22 [INFO] [stdout] | [INFO] [stdout] 175 | label.lim = Some(next_lim.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:218:6 [INFO] [stdout] | [INFO] [stdout] 218 | if v_label.lim.clone().unwrap_or(0) > w_label.lim.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:218:41 [INFO] [stdout] | [INFO] [stdout] 218 | if v_label.lim.clone().unwrap_or(0) > w_label.lim.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `w_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/acyclic.rs:70:8 [INFO] [stdout] | [INFO] [stdout] 70 | if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.reversed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/layout/rank/network_simplex.rs:248:5 [INFO] [stdout] | [INFO] [stdout] 248 | !g.node(v).unwrap_or(&GraphNode::default()).parent.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.node(v).unwrap_or(&GraphNode::default()).parent.is_some()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:282:17 [INFO] [stdout] | [INFO] [stdout] 282 | tree.has_edge(&u, &v, None) [INFO] [stdout] | ^^ help: change this to: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/layout/nesting_graph.rs:39:3 [INFO] [stdout] | [INFO] [stdout] 39 | / if height > 0 { [INFO] [stdout] 40 | | height -= 1; [INFO] [stdout] 41 | | } [INFO] [stdout] | |___^ help: try: `height = height.saturating_sub(1);` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:282:21 [INFO] [stdout] | [INFO] [stdout] 282 | tree.has_edge(&u, &v, None) [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:290:13 [INFO] [stdout] | [INFO] [stdout] 290 | let low = root_label.low.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `root_label.low` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:291:15 [INFO] [stdout] | [INFO] [stdout] 291 | let v_lim = v_label.lim.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/nesting_graph.rs:88:3 [INFO] [stdout] | [INFO] [stdout] 88 | return depths; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 88 - return depths; [INFO] [stdout] 88 + depths [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:292:18 [INFO] [stdout] | [INFO] [stdout] 292 | let root_lim = root_label.lim.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `root_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `border_bottom` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/nesting_graph.rs:136:22 [INFO] [stdout] | [INFO] [stdout] 135 | if border_bottom.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = border_bottom` [INFO] [stdout] 136 | child_bottom = border_bottom.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/nesting_graph.rs:93:6 [INFO] [stdout] | [INFO] [stdout] 93 | if children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/normalize/mod.rs:78:3 [INFO] [stdout] | [INFO] [stdout] 78 | graph_edge.weight = weight; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: weight, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/normalize/mod.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | let mut v_rank = g.node(&v).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(&v).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:96:7 [INFO] [stdout] | [INFO] [stdout] 96 | graph_edge.minlen = Some(node_sep.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some(node_sep.clone()), weight: Some(0.0), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:95:7 [INFO] [stdout] | [INFO] [stdout] 95 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:96:32 [INFO] [stdout] | [INFO] [stdout] 96 | graph_edge.minlen = Some(node_sep.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*node_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | let w_rank = g.node(&w).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(&w).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:98:30 [INFO] [stdout] | [INFO] [stdout] 98 | let _ = graph.set_edge(&root, &node_id, Some(graph_edge), None); [INFO] [stdout] | ^^^^^ help: change this to: `root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/normalize/mod.rs:35:40 [INFO] [stdout] | [INFO] [stdout] 35 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:98:37 [INFO] [stdout] | [INFO] [stdout] 98 | let _ = graph.set_edge(&root, &node_id, Some(graph_edge), None); [INFO] [stdout] | ^^^^^^^^ help: change this to: `node_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | let weight = edge_label.weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/nesting_graph.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 100 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/normalize/mod.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/normalize/mod.rs:45:26 [INFO] [stdout] | [INFO] [stdout] 45 | g.remove_edge_with_obj(&e); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/normalize/mod.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | attrs.edge_label = Some(_edge_label.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { edge_label: Some(_edge_label.clone()), edge_obj: Some(e.clone()), rank: Some(v_rank.clone()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/normalize/mod.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | let mut attrs = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | _ct_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some(minlen.clone() as f32), weight: Some(this_weight.clone()), nesting_edge: Some(true), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | let mut _ct_graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/normalize/mod.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | dummy_edge_label.weight = weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: weight.clone(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/normalize/mod.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | let mut dummy_edge_label = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | _cb_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some(minlen.clone() as f32), weight: Some(this_weight.clone()), nesting_edge: Some(true), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | let mut _cb_graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:53:23 [INFO] [stdout] | [INFO] [stdout] 53 | attrs.rank = Some(v_rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | attrs.width = _edge_label.width.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `_edge_label.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:129:32 [INFO] [stdout] | [INFO] [stdout] 129 | let mut this_weight: f32 = weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | attrs.height = _edge_label.height.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `_edge_label.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:139:27 [INFO] [stdout] | [INFO] [stdout] 139 | this_weight = 2.0 * weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | dummy_edge_label.weight = weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:146:34 [INFO] [stdout] | [INFO] [stdout] 146 | _ct_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `minlen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:147:34 [INFO] [stdout] | [INFO] [stdout] 147 | _ct_graph_edge.weight = Some(this_weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `this_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:152:34 [INFO] [stdout] | [INFO] [stdout] 152 | _cb_graph_edge.minlen = Some(minlen.clone() as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `minlen` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | _cb_graph_edge.weight = Some(this_weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `this_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | graph_edge.minlen = Some((depths.get(node_id).cloned().unwrap_or(0) + height.clone()) as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { minlen: Some((depths.get(node_id).cloned().unwrap_or(0) + height.clone()) as f32), weight: Some(0.0), nesting_edge: Some(true), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/nesting_graph.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/normalize/mod.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:160:75 [INFO] [stdout] | [INFO] [stdout] 160 | graph_edge.minlen = Some((depths.get(node_id).cloned().unwrap_or(0) + height.clone()) as f32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:163:28 [INFO] [stdout] | [INFO] [stdout] 163 | let _ = graph.set_edge(&root, &top, Some(graph_edge), None); [INFO] [stdout] | ^^^^^ help: change this to: `root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | x: node.x.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/nesting_graph.rs:178:3 [INFO] [stdout] | [INFO] [stdout] 178 | return total_weights; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 178 - return total_weights; [INFO] [stdout] 178 + total_weights [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:109:12 [INFO] [stdout] | [INFO] [stdout] 109 | y: node.y.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:112:24 [INFO] [stdout] | [INFO] [stdout] 112 | orig_label.x = node.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:113:24 [INFO] [stdout] | [INFO] [stdout] 113 | orig_label.y = node.y.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:114:33 [INFO] [stdout] | [INFO] [stdout] 114 | orig_label.width = Some(node.width.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:115:34 [INFO] [stdout] | [INFO] [stdout] 115 | orig_label.height = Some(node.height.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:192:10 [INFO] [stdout] | [INFO] [stdout] 192 | if edge_label.nesting_edge.clone().unwrap_or(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.nesting_edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | return UNIQUE_STARTER; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 11 - return UNIQUE_STARTER; [INFO] [stdout] 11 + UNIQUE_STARTER [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:29:3 [INFO] [stdout] | [INFO] [stdout] 29 | return node_id; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return node_id; [INFO] [stdout] 29 + node_id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | if path.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | g.node(path_v).unwrap_or(&empty_node).max_rank.clone().unwrap_or(0) < node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(path_v).unwrap_or(&empty_node).max_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:34:83 [INFO] [stdout] | [INFO] [stdout] 34 | g.node(path_v).unwrap_or(&empty_node).max_rank.clone().unwrap_or(0) < node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:51:11 [INFO] [stdout] | [INFO] [stdout] 51 | g.node(path_v).unwrap().min_rank.clone().unwrap_or(0) <= node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(path_v).unwrap().min_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:51:68 [INFO] [stdout] | [INFO] [stdout] 51 | g.node(path_v).unwrap().min_rank.clone().unwrap_or(0) <= node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `g.successors(&v).unwrap_or(vec![]).get(0)` [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:58:11 [INFO] [stdout] | [INFO] [stdout] 58 | v = g.successors(&v).unwrap_or(vec![]).get(0).unwrap_or(&empty_string).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.successors(&v).unwrap_or(vec![]).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: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:98:3 [INFO] [stdout] | [INFO] [stdout] 98 | return (v_path, lca.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 98 - return (v_path, lca.clone()); [INFO] [stdout] 98 + (v_path, lca.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:109:3 [INFO] [stdout] | [INFO] [stdout] 109 | return simplified; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 109 - return simplified; [INFO] [stdout] 109 + simplified [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:118:3 [INFO] [stdout] | [INFO] [stdout] 118 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 118 - return result; [INFO] [stdout] 118 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:106:15 [INFO] [stdout] | [INFO] [stdout] 106 | let low = lim.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:107:16 [INFO] [stdout] | [INFO] [stdout] 107 | g.children(&v).iter().for_each(|v_| { [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:110:36 [INFO] [stdout] | [INFO] [stdout] 110 | result.insert(v.clone(), (low, lim.clone())); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | if g.children(&v).len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | if source.children(&v).len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `source.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/add_border_segments.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if children.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | let mut rank = node.min_rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.min_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | let max_rank = node.max_rank.clone().unwrap_or(0) + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.max_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:185:3 [INFO] [stdout] | [INFO] [stdout] 185 | / return layering.into_iter().map(|layer| -> Vec { [INFO] [stdout] 186 | | let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] 187 | | keys.sort(); [INFO] [stdout] 188 | | keys.iter().map(|key| -> String { [INFO] [stdout] 189 | | layer.get(key).cloned().unwrap() [INFO] [stdout] 190 | | }).collect() [INFO] [stdout] 191 | | }).collect(); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 185 ~ layering.into_iter().map(|layer| -> Vec { [INFO] [stdout] 186 + let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] 187 + keys.sort(); [INFO] [stdout] 188 + keys.iter().map(|key| -> String { [INFO] [stdout] 189 + layer.get(key).cloned().unwrap() [INFO] [stdout] 190 + }).collect() [INFO] [stdout] 191 ~ }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/add_border_segments.rs:42:3 [INFO] [stdout] | [INFO] [stdout] 42 | label.rank = Some(rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { rank: Some(rank.clone()), border_type: Some(prop.clone()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/add_border_segments.rs:41:3 [INFO] [stdout] | [INFO] [stdout] 41 | let mut label = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | label.rank = Some(rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/layout/add_border_segments.rs:49:3 [INFO] [stdout] | [INFO] [stdout] 49 | / match prop { [INFO] [stdout] 50 | | BorderTypeName::BorderRight => { [INFO] [stdout] 51 | | border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] 52 | | }, [INFO] [stdout] 53 | | _ => () [INFO] [stdout] 54 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 49 ~ if prop == BorderTypeName::BorderRight { [INFO] [stdout] 50 + border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] 51 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | border.insert(rank.clone(), curr.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | graph.node(v).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph.node(v).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/add_border_segments.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | graph_edge.weight = Some(1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: Some(1.0), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/add_border_segments.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:226:16 [INFO] [stdout] | [INFO] [stdout] 226 | let rank = graph.node(v).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0) - offset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph.node(v).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:227:18 [INFO] [stdout] | [INFO] [stdout] 227 | layers.entry(rank.clone()).or_insert(vec![]).push(v.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | let node_rank = node.rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:231:26 [INFO] [stdout] | [INFO] [stdout] 231 | let node_rank_factor = graph.graph().node_rank_factor.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph.graph().node_rank_factor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / match relationship { [INFO] [stdout] 61 | | GraphRelationship::OutEdges => { [INFO] [stdout] 62 | | _relationship = g.out_edges(v, None).unwrap_or(vec![]); [INFO] [stdout] 63 | | }, [INFO] [stdout] 64 | | _ => () [INFO] [stdout] 65 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 ~ if let GraphRelationship::OutEdges = relationship { [INFO] [stdout] 61 + _relationship = g.out_edges(v, None).unwrap_or(vec![]); [INFO] [stdout] 62 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:233:8 [INFO] [stdout] | [INFO] [stdout] 233 | if vs.len() == 0 && i.clone() % node_rank_factor != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `vs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:233:25 [INFO] [stdout] | [INFO] [stdout] 233 | if vs.len() == 0 && i.clone() % node_rank_factor != 0 { [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `edge` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:83:11 [INFO] [stdout] | [INFO] [stdout] 82 | let weight = if edge.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = edge` [INFO] [stdout] 83 | edge.unwrap().weight.clone().unwrap_or(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | edge_label.weight = Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | let mut edge_label = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:239:53 [INFO] [stdout] | [INFO] [stdout] 239 | node.rank = Some(node.rank.unwrap_or(0) + delta.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `delta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:81:36 [INFO] [stdout] | [INFO] [stdout] 81 | let edge = result.edge(&u, &v, None); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:261:3 [INFO] [stdout] | [INFO] [stdout] 261 | return add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 261 - return add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()); [INFO] [stdout] 261 + add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:83:11 [INFO] [stdout] | [INFO] [stdout] 83 | edge.unwrap().weight.clone().unwrap_or(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.unwrap().weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:266:5 [INFO] [stdout] | [INFO] [stdout] 266 | g.node(v).as_ref().unwrap().rank.clone().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v).as_ref().unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:88:34 [INFO] [stdout] | [INFO] [stdout] 88 | edge_label.weight = Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.edge_with_obj(&e).unwrap().weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:294:3 [INFO] [stdout] | [INFO] [stdout] 294 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 294 - return result; [INFO] [stdout] 294 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:88:50 [INFO] [stdout] | [INFO] [stdout] 88 | edge_label.weight = Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/util.rs:280:40 [INFO] [stdout] | [INFO] [stdout] 280 | pub fn partition(collection: &Vec, fn_: Box bool>) -> PartitionResponse { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 280 - pub fn partition(collection: &Vec, fn_: Box bool>) -> PartitionResponse { [INFO] [stdout] 280 + pub fn partition(collection: &[V], fn_: Box bool>) -> PartitionResponse { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:89:37 [INFO] [stdout] | [INFO] [stdout] 89 | let _ = result.set_edge(&u, &v, Some(edge_label), None); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | return rank; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - return rank; [INFO] [stdout] 47 + rank [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | graph_node.border_left_ = node.border_left.as_ref().unwrap().get(rank).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { border_left_: node.border_left.as_ref().unwrap().get(rank).cloned(), border_right_: node.border_right.as_ref().unwrap().get(rank).cloned(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | let mut graph_node = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/util.rs:38:48 [INFO] [stdout] | [INFO] [stdout] 38 | dfs(&e.w, g, visited) - (g.edge_with_obj(&e).cloned().unwrap_or(GraphEdge::default()).minlen.unwrap_or(0.0).round() as i32) [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/init_order.rs:60:3 [INFO] [stdout] | [INFO] [stdout] 60 | return layers; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 60 - return layers; [INFO] [stdout] 60 + layers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/layout/rank/util.rs:40:21 [INFO] [stdout] | [INFO] [stdout] 40 | let rank: i32 = ranks.iter().min().cloned().unwrap_or(0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ranks.iter().min().cloned().unwrap_or(0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/init_order.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | g.children(v).len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.children(v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | g.node(v).unwrap().rank.clone().unwrap_or(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v).unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/util.rs:44:32 [INFO] [stdout] | [INFO] [stdout] 44 | node_label.rank = Some(rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/init_order.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 31 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:63:3 [INFO] [stdout] | [INFO] [stdout] 63 | return w_rank - v_rank - minlen; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return w_rank - v_rank - minlen; [INFO] [stdout] 63 + w_rank - v_rank - minlen [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:37:19 [INFO] [stdout] | [INFO] [stdout] 37 | if layers.get(node_rank.clone()).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:51:22 [INFO] [stdout] | [INFO] [stdout] 51 | delta = Some(-1 * slack(g, &edge_)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-slack(g, &edge_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | layers.insert(node_rank.clone(), vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:88:3 [INFO] [stdout] | [INFO] [stdout] 88 | return t.node_count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 88 - return t.node_count(); [INFO] [stdout] 88 + t.node_count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:40:50 [INFO] [stdout] | [INFO] [stdout] 40 | let layer: &mut Vec = layers.get_mut(node_rank.clone()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | let _ = t.set_edge(&v, &w, Some(GraphEdge::default()), None); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | let v1_rank = g.node(v1).unwrap().rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v1).unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:51:19 [INFO] [stdout] | [INFO] [stdout] 51 | let v2_rank = g.node(v2).unwrap().rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v2).unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `result` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:110:10 [INFO] [stdout] | [INFO] [stdout] 109 | if result.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = result` [INFO] [stdout] 110 | Some(result.unwrap().0.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | let bl = if node.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = node` [INFO] [stdout] 24 | node.unwrap().border_left_.clone() [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:106:7 [INFO] [stdout] | [INFO] [stdout] 106 | return e1_.unwrap().cmp(&e2_.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 106 - return e1_.unwrap().cmp(&e2_.unwrap()); [INFO] [stdout] 106 + e1_.unwrap().cmp(&e2_.unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 28 | let br = if node.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = node` [INFO] [stdout] 29 | node.unwrap().border_right_.clone() [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `f` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/network_simplex.rs:60:54 [INFO] [stdout] | [INFO] [stdout] 59 | if f.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = f` [INFO] [stdout] 60 | exchange_edges(&mut t, g, &e.clone().unwrap(), f.unwrap()); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 77 - return result; [INFO] [stdout] 77 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:58:24 [INFO] [stdout] | [INFO] [stdout] 58 | f = enter_edge(&t, &g, &e.clone().unwrap()); [INFO] [stdout] | ^^ help: change this to: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / movable = movable.into_iter().filter(|w| { [INFO] [stdout] 37 | | w != &bl.clone().unwrap() && w != &br.clone().unwrap() [INFO] [stdout] 38 | | }).collect(); [INFO] [stdout] | |________________^ [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] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 36 ~ movable.retain(|w| { [INFO] [stdout] 37 + w != &bl.clone().unwrap() && w != &br.clone().unwrap() [INFO] [stdout] 38 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | if g.children(&entry.v).len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!g.children(&entry.v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | if bl_preds.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bl_preds.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:86:34 [INFO] [stdout] | [INFO] [stdout] 86 | let edge_label_ = t.edge_mut(&child, &parent, None); [INFO] [stdout] | ^^^^^^ help: change this to: `child` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:69:27 [INFO] [stdout] | [INFO] [stdout] 69 | let bl_pred_order = bl_pred.order.clone().unwrap_or(0) as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `bl_pred.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:110:40 [INFO] [stdout] | [INFO] [stdout] 110 | graph_edge = g.edge_mut(&parent, &child, None); [INFO] [stdout] | ^^^^^^ help: change this to: `child` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:70:27 [INFO] [stdout] | [INFO] [stdout] 70 | let br_pred_order = br_pred.order.clone().unwrap_or(0) as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `br_pred.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:80:30 [INFO] [stdout] | [INFO] [stdout] 80 | fn expand_subgraphs(entries: &mut Vec, subgraphs: &OrderedHashMap) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - fn expand_subgraphs(entries: &mut Vec, subgraphs: &OrderedHashMap) { [INFO] [stdout] 80 + fn expand_subgraphs(entries: &mut [ResolvedBaryEntry], subgraphs: &OrderedHashMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:89:16 [INFO] [stdout] | [INFO] [stdout] 89 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:99:27 [INFO] [stdout] | [INFO] [stdout] 99 | let target_barycenter = target.barycenter.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:101:25 [INFO] [stdout] | [INFO] [stdout] 101 | let target_weight = target.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:131:40 [INFO] [stdout] | [INFO] [stdout] 131 | let out_cut_value = t.edge(&child, &other, None) [INFO] [stdout] | ^^^^^^ help: change this to: `child` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:107:42 [INFO] [stdout] | [INFO] [stdout] 107 | target.weight = Some(target_weight + other.weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:109:30 [INFO] [stdout] | [INFO] [stdout] 109 | target.barycenter = Some(other.barycenter.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `root_` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/network_simplex.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 151 | if root_.is_some() { [INFO] [stdout] | ------------------ help: try: `if let Some() = root_` [INFO] [stdout] 152 | root = root_.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | target.weight = Some(other.weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | let low = next_lim_.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim_` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:160:22 [INFO] [stdout] | [INFO] [stdout] 160 | let mut next_lim = next_lim_.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim_` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/barycenter.rs:11:74 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn barycenter(g: &Graph, movable: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - pub fn barycenter(g: &Graph, movable: &Vec) -> Vec { [INFO] [stdout] 11 + pub fn barycenter(g: &Graph, movable: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/barycenter.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / return Barycenter { [INFO] [stdout] 33 | | v: v.clone(), [INFO] [stdout] 34 | | barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] 35 | | weight: Some(result.1 as f32) [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 ~ Barycenter { [INFO] [stdout] 33 + v: v.clone(), [INFO] [stdout] 34 + barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] 35 + weight: Some(result.1 as f32) [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:167:54 [INFO] [stdout] | [INFO] [stdout] 167 | next_lim = dfs_assign_low_lim(tree, visited, next_lim.clone(), &w, Some(v)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/barycenter.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | if in_v.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `in_v.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:175:22 [INFO] [stdout] | [INFO] [stdout] 175 | label.lim = Some(next_lim.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/barycenter.rs:25:34 [INFO] [stdout] | [INFO] [stdout] 25 | let edge = g.edge_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | let edge_weight = edge.weight.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:28:34 [INFO] [stdout] | [INFO] [stdout] 28 | result.0 += edge_weight * (node_u.order.clone().unwrap_or(0) as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_u.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:34:24 [INFO] [stdout] | [INFO] [stdout] 34 | barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:34:50 [INFO] [stdout] | [INFO] [stdout] 34 | barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:218:6 [INFO] [stdout] | [INFO] [stdout] 218 | if v_label.lim.clone().unwrap_or(0) > w_label.lim.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:218:41 [INFO] [stdout] | [INFO] [stdout] 218 | if v_label.lim.clone().unwrap_or(0) > w_label.lim.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `w_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/layout/rank/network_simplex.rs:248:5 [INFO] [stdout] | [INFO] [stdout] 248 | !g.node(v).unwrap_or(&GraphNode::default()).parent.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.node(v).unwrap_or(&GraphNode::default()).parent.is_some()` [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: unneeded `return` statement [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:80:3 [INFO] [stdout] | [INFO] [stdout] 80 | return do_resolve_conflicts(&mut source_set); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 80 - return do_resolve_conflicts(&mut source_set); [INFO] [stdout] 80 + do_resolve_conflicts(&mut source_set) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:43:36 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn resolve_conflicts (entries: &Vec, cg: &Graph) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - pub fn resolve_conflicts (entries: &Vec, cg: &Graph) -> Vec { [INFO] [stdout] 43 + pub fn resolve_conflicts (entries: &[Barycenter], cg: &Graph) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | mapped_entry.barycenter = entry.barycenter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:58:29 [INFO] [stdout] | [INFO] [stdout] 58 | mapped_entry.weight = entry.weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:131:3 [INFO] [stdout] | [INFO] [stdout] 131 | / return entries.into_iter().filter(|entry| { [INFO] [stdout] 132 | | !entry.merged.clone().unwrap_or(false) [INFO] [stdout] 133 | | }).collect(); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 ~ entries.into_iter().filter(|entry| { [INFO] [stdout] 132 + !entry.merged.clone().unwrap_or(false) [INFO] [stdout] 133 ~ }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:88:24 [INFO] [stdout] | [INFO] [stdout] 88 | source_hash.insert(entry.i.clone(), entry.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:282:17 [INFO] [stdout] | [INFO] [stdout] 282 | tree.has_edge(&u, &v, None) [INFO] [stdout] | ^^ help: change this to: `u` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:282:21 [INFO] [stdout] | [INFO] [stdout] 282 | tree.has_edge(&u, &v, None) [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:290:13 [INFO] [stdout] | [INFO] [stdout] 290 | let low = root_label.low.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `root_label.low` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:291:15 [INFO] [stdout] | [INFO] [stdout] 291 | let v_lim = v_label.lim.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:100:10 [INFO] [stdout] | [INFO] [stdout] 100 | || u_entry.barycenter.clone().unwrap_or(0.0) >= v_entry.barycenter.clone().unwrap_or(0.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `u_entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:292:18 [INFO] [stdout] | [INFO] [stdout] 292 | let root_lim = root_label.lim.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `root_label.lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:100:55 [INFO] [stdout] | [INFO] [stdout] 100 | || u_entry.barycenter.clone().unwrap_or(0.0) >= v_entry.barycenter.clone().unwrap_or(0.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | while source_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!source_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/normalize/mod.rs:78:3 [INFO] [stdout] | [INFO] [stdout] 78 | graph_edge.weight = weight; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: weight, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/normalize/mod.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:132:6 [INFO] [stdout] | [INFO] [stdout] 132 | !entry.merged.clone().unwrap_or(false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.merged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | let mut v_rank = g.node(&v).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(&v).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | let w_rank = g.node(&w).unwrap_or(&GraphNode::default()).rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(&w).unwrap_or(&GraphNode::default()).rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | let target_weight = target_.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target_.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:143:29 [INFO] [stdout] | [INFO] [stdout] 143 | let target_barycenter = target_.barycenter.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target_.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/normalize/mod.rs:35:40 [INFO] [stdout] | [INFO] [stdout] 35 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | let weight = edge_label.weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:150:25 [INFO] [stdout] | [INFO] [stdout] 150 | let source_weight = source_.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `source_.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | let source_barycenter = source_.barycenter.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `source_.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/normalize/mod.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/normalize/mod.rs:45:26 [INFO] [stdout] | [INFO] [stdout] 45 | g.remove_edge_with_obj(&e); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/normalize/mod.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | attrs.edge_label = Some(_edge_label.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { edge_label: Some(_edge_label.clone()), edge_obj: Some(e.clone()), rank: Some(v_rank.clone()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/normalize/mod.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | let mut attrs = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:163:28 [INFO] [stdout] | [INFO] [stdout] 163 | target.i = std::cmp::min(source_.i.clone(), target_.i.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `source_.i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/normalize/mod.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | dummy_edge_label.weight = weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: weight.clone(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/normalize/mod.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | let mut dummy_edge_label = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:163:47 [INFO] [stdout] | [INFO] [stdout] 163 | target.i = std::cmp::min(source_.i.clone(), target_.i.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target_.i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:53:23 [INFO] [stdout] | [INFO] [stdout] 53 | attrs.rank = Some(v_rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | attrs.width = _edge_label.width.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `_edge_label.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort.rs:43:3 [INFO] [stdout] | [INFO] [stdout] 43 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 43 - return result; [INFO] [stdout] 43 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/order/sort.rs:37:3 [INFO] [stdout] | [INFO] [stdout] 37 | result.vs = vs; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layout::order::sort_subgraph::SubgraphResult { vs: vs, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/order/sort.rs:36:3 [INFO] [stdout] | [INFO] [stdout] 36 | let mut result = SubgraphResult::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | let entry_weight = entry.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | sum += entry.barycenter.clone().unwrap_or(0.0) * entry_weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:31:54 [INFO] [stdout] | [INFO] [stdout] 31 | sum += entry.barycenter.clone().unwrap_or(0.0) * entry_weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | weight += entry_weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort.rs:56:3 [INFO] [stdout] | [INFO] [stdout] 56 | return index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return index.clone(); [INFO] [stdout] 56 + index.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort.rs:47:6 [INFO] [stdout] | [INFO] [stdout] 47 | if unsortable.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `unsortable.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | return index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `unsortable.get(unsortable.len() - 1)` [INFO] [stdout] --> src/layout/order/sort.rs:50:37 [INFO] [stdout] | [INFO] [stdout] 50 | let mut last: ResolvedBaryEntry = unsortable.get(unsortable.len() - 1).cloned().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unsortable.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | while unsortable.len() > 0 && &last.i <= index { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!unsortable.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | return index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort.rs:68:3 [INFO] [stdout] | [INFO] [stdout] 68 | / return if !bias { [INFO] [stdout] 69 | | entry_v.i.cmp(&entry_w.i) [INFO] [stdout] 70 | | } else { [INFO] [stdout] 71 | | entry_w.i.cmp(&entry_v.i) [INFO] [stdout] 72 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 68 ~ if !bias { [INFO] [stdout] 69 + entry_v.i.cmp(&entry_w.i) [INFO] [stdout] 70 + } else { [INFO] [stdout] 71 + entry_w.i.cmp(&entry_v.i) [INFO] [stdout] 72 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:60:22 [INFO] [stdout] | [INFO] [stdout] 60 | let barycenter_v = entry_v.barycenter.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_v.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:61:22 [INFO] [stdout] | [INFO] [stdout] 61 | let barycenter_w = entry_w.barycenter.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_w.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | vs: &Vec [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 8 - vs: &Vec [INFO] [stdout] 8 + vs: &[String] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/cross_count.rs:30:3 [INFO] [stdout] | [INFO] [stdout] 30 | return cc; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 30 - return cc; [INFO] [stdout] 30 + cc [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/cross_count.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | layering: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - layering: &mut Vec>, [INFO] [stdout] 35 + layering: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/cross_count.rs:43:34 [INFO] [stdout] | [INFO] [stdout] 43 | let south_layer = layering.get(south_idx.clone()).cloned().unwrap_or(vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*south_idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/cross_count.rs:49:55 [INFO] [stdout] | [INFO] [stdout] 49 | let south_entries: Vec<(usize, f32)> = layering.get(north_idx.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*north_idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/mod.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | / return ranks.iter().map(|rank| { [INFO] [stdout] 78 | | build_layer_graph(g, rank, relationship) [INFO] [stdout] 79 | | }).collect() [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 77 ~ ranks.iter().map(|rank| { [INFO] [stdout] 78 + build_layer_graph(g, rank, relationship) [INFO] [stdout] 79 + }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | attrs.height = _edge_label.height.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `_edge_label.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | dummy_edge_label.weight = weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/normalize/mod.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | x: node.x.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:109:12 [INFO] [stdout] | [INFO] [stdout] 109 | y: node.y.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:112:24 [INFO] [stdout] | [INFO] [stdout] 112 | orig_label.x = node.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:113:24 [INFO] [stdout] | [INFO] [stdout] 113 | orig_label.y = node.y.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:114:33 [INFO] [stdout] | [INFO] [stdout] 114 | orig_label.width = Some(node.width.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/normalize/mod.rs:115:34 [INFO] [stdout] | [INFO] [stdout] 115 | orig_label.height = Some(node.height.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | if path.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | g.node(path_v).unwrap_or(&empty_node).max_rank.clone().unwrap_or(0) < node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(path_v).unwrap_or(&empty_node).max_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:34:83 [INFO] [stdout] | [INFO] [stdout] 34 | g.node(path_v).unwrap_or(&empty_node).max_rank.clone().unwrap_or(0) < node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:51:11 [INFO] [stdout] | [INFO] [stdout] 51 | g.node(path_v).unwrap().min_rank.clone().unwrap_or(0) <= node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(path_v).unwrap().min_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:51:68 [INFO] [stdout] | [INFO] [stdout] 51 | g.node(path_v).unwrap().min_rank.clone().unwrap_or(0) <= node.rank.clone().unwrap_or(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `g.successors(&v).unwrap_or(vec![]).get(0)` [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:58:11 [INFO] [stdout] | [INFO] [stdout] 58 | v = g.successors(&v).unwrap_or(vec![]).get(0).unwrap_or(&empty_string).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `g.successors(&v).unwrap_or(vec![]).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: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:98:3 [INFO] [stdout] | [INFO] [stdout] 98 | return (v_path, lca.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 98 - return (v_path, lca.clone()); [INFO] [stdout] 98 + (v_path, lca.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:118:3 [INFO] [stdout] | [INFO] [stdout] 118 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 118 - return result; [INFO] [stdout] 118 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:106:15 [INFO] [stdout] | [INFO] [stdout] 106 | let low = lim.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:107:16 [INFO] [stdout] | [INFO] [stdout] 107 | g.children(&v).iter().for_each(|v_| { [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:110:36 [INFO] [stdout] | [INFO] [stdout] 110 | result.insert(v.clone(), (low, lim.clone())); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*lim` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/add_border_segments.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if children.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | let mut rank = node.min_rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.min_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | let max_rank = node.max_rank.clone().unwrap_or(0) + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.max_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/add_border_segments.rs:42:3 [INFO] [stdout] | [INFO] [stdout] 42 | label.rank = Some(rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { rank: Some(rank.clone()), border_type: Some(prop.clone()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/add_border_segments.rs:41:3 [INFO] [stdout] | [INFO] [stdout] 41 | let mut label = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | label.rank = Some(rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/layout/add_border_segments.rs:49:3 [INFO] [stdout] | [INFO] [stdout] 49 | / match prop { [INFO] [stdout] 50 | | BorderTypeName::BorderRight => { [INFO] [stdout] 51 | | border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] 52 | | }, [INFO] [stdout] 53 | | _ => () [INFO] [stdout] 54 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 49 ~ if prop == BorderTypeName::BorderRight { [INFO] [stdout] 50 + border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] 51 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | border.insert(rank.clone(), curr.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/add_border_segments.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | graph_edge.weight = Some(1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: Some(1.0), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/add_border_segments.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | let mut graph_edge = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:76:80 [INFO] [stdout] | [INFO] [stdout] 76 | fn build_layer_graphs(g: &mut Graph, ranks: &Vec, relationship: GraphRelationship) -> Vec, ranks: &Vec, relationship: GraphRelationship) -> Vec> { [INFO] [stdout] 76 + fn build_layer_graphs(g: &mut Graph, ranks: &[i32], relationship: GraphRelationship) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:82:37 [INFO] [stdout] | [INFO] [stdout] 82 | fn sweep_layer_graphs(layer_graphs: &mut Vec>, bias_right: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - fn sweep_layer_graphs(layer_graphs: &mut Vec>, bias_right: bool) { [INFO] [stdout] 82 + fn sweep_layer_graphs(layer_graphs: &mut [Graph], bias_right: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | let node_rank = node.rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / match relationship { [INFO] [stdout] 61 | | GraphRelationship::OutEdges => { [INFO] [stdout] 62 | | _relationship = g.out_edges(v, None).unwrap_or(vec![]); [INFO] [stdout] 63 | | }, [INFO] [stdout] 64 | | _ => () [INFO] [stdout] 65 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 ~ if let GraphRelationship::OutEdges = relationship { [INFO] [stdout] 61 + _relationship = g.out_edges(v, None).unwrap_or(vec![]); [INFO] [stdout] 62 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `edge` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:83:11 [INFO] [stdout] | [INFO] [stdout] 82 | let weight = if edge.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = edge` [INFO] [stdout] 83 | edge.unwrap().weight.clone().unwrap_or(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | edge_label.weight = Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphEdge { weight: Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | let mut edge_label = GraphEdge::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:81:36 [INFO] [stdout] | [INFO] [stdout] 81 | let edge = result.edge(&u, &v, None); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | let w = node.width.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:83:11 [INFO] [stdout] | [INFO] [stdout] 83 | edge.unwrap().weight.clone().unwrap_or(0.0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.unwrap().weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/coordinate_system.rs:35:42 [INFO] [stdout] | [INFO] [stdout] 35 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:88:34 [INFO] [stdout] | [INFO] [stdout] 88 | edge_label.weight = Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.edge_with_obj(&e).unwrap().weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | let w = edge_label.width.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:88:50 [INFO] [stdout] | [INFO] [stdout] 88 | edge_label.weight = Some(g.edge_with_obj(&e).unwrap().weight.clone().unwrap_or(0.0) + weight); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:89:37 [INFO] [stdout] | [INFO] [stdout] 89 | let _ = result.set_edge(&u, &v, Some(edge_label), None); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | graph_node.border_left_ = node.border_left.as_ref().unwrap().get(rank).cloned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { border_left_: node.border_left.as_ref().unwrap().get(rank).cloned(), border_right_: node.border_right.as_ref().unwrap().get(rank).cloned(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/order/build_layer_graph.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | let mut graph_node = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/coordinate_system.rs:53:42 [INFO] [stdout] | [INFO] [stdout] 53 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | let x = node.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/init_order.rs:60:3 [INFO] [stdout] | [INFO] [stdout] 60 | return layers; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 60 - return layers; [INFO] [stdout] 60 + layers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/init_order.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | g.children(v).len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.children(v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | g.node(v).unwrap().rank.clone().unwrap_or(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v).unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/coordinate_system.rs:76:42 [INFO] [stdout] | [INFO] [stdout] 76 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:79:15 [INFO] [stdout] | [INFO] [stdout] 79 | let x = point.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `point.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | let x = edge_label.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/init_order.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 31 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:30:86 [INFO] [stdout] | [INFO] [stdout] 30 | fn find_type_1_conflicts(g: &mut Graph, layering: &Vec>) -> OrderedHashMap, layering: &Vec>) -> OrderedHashMap> { [INFO] [stdout] 30 + fn find_type_1_conflicts(g: &mut Graph, layering: &[Vec]) -> OrderedHashMap> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:37:19 [INFO] [stdout] | [INFO] [stdout] 37 | if layers.get(node_rank.clone()).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | layers.insert(node_rank.clone(), vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | prev_layer: &Vec, layer: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - prev_layer: &Vec, layer: &Vec, [INFO] [stdout] 35 + prev_layer: &[String], layer: &Vec, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:35:38 [INFO] [stdout] | [INFO] [stdout] 35 | prev_layer: &Vec, layer: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - prev_layer: &Vec, layer: &Vec, [INFO] [stdout] 35 + prev_layer: &Vec, layer: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:40:50 [INFO] [stdout] | [INFO] [stdout] 40 | let layer: &mut Vec = layers.get_mut(node_rank.clone()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | let v1_rank = g.node(v1).unwrap().rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v1).unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:51:19 [INFO] [stdout] | [INFO] [stdout] 51 | let v2_rank = g.node(v2).unwrap().rank.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(v2).unwrap().rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | visit_layer(g, &prev_layer, layer, &mut conflicts); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `prev_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | layering: &Vec> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - layering: &Vec> [INFO] [stdout] 82 + layering: &[Vec] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:86:68 [INFO] [stdout] | [INFO] [stdout] 86 | fn scan(g: &mut Graph, south: &Vec, south_pos: &usize, south_end: &usize, prev_north_bo... [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 86 - fn scan(g: &mut Graph, south: &Vec, south_pos: &usize, south_end: &usize, prev_north_border: &i32, next_north_border: &i32, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] 86 + fn scan(g: &mut Graph, south: &[String], south_pos: &usize, south_end: &usize, prev_north_border: &i32, next_north_border: &i32, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in south_pos.clone()..south_end.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*south_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:87:33 [INFO] [stdout] | [INFO] [stdout] 87 | for i in south_pos.clone()..south_end.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*south_end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | let bl = if node.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = node` [INFO] [stdout] 24 | node.unwrap().border_left_.clone() [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:94:32 [INFO] [stdout] | [INFO] [stdout] 94 | let u_node_order = u_node.order.clone().unwrap_or(0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `u_node.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 28 | let br = if node.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = node` [INFO] [stdout] 29 | node.unwrap().border_right_.clone() [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 77 - return result; [INFO] [stdout] 77 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `predecessors_` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:118:32 [INFO] [stdout] | [INFO] [stdout] 117 | if predecessors_.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = predecessors_` [INFO] [stdout] 118 | let predecessors = predecessors_.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:106:75 [INFO] [stdout] | [INFO] [stdout] 106 | fn visit_layer(g: &mut Graph, north: &Vec, south: &Vec, conflicts: &mut Ordere... [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 106 - fn visit_layer(g: &mut Graph, north: &Vec, south: &Vec, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] 106 + fn visit_layer(g: &mut Graph, north: &[String], south: &Vec, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / movable = movable.into_iter().filter(|w| { [INFO] [stdout] 37 | | w != &bl.clone().unwrap() && w != &br.clone().unwrap() [INFO] [stdout] 38 | | }).collect(); [INFO] [stdout] | |________________^ [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] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 36 ~ movable.retain(|w| { [INFO] [stdout] 37 + w != &bl.clone().unwrap() && w != &br.clone().unwrap() [INFO] [stdout] 38 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:119:16 [INFO] [stdout] | [INFO] [stdout] 119 | if predecessors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!predecessors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | if g.children(&entry.v).len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!g.children(&entry.v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | next_north_pos = g.node(&predecessors[0]).unwrap().order.clone().unwrap_or(0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(&predecessors[0]).unwrap().order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:121:23 [INFO] [stdout] | [INFO] [stdout] 121 | scan(g, &south, &south_pos, &south.len(), &next_north_pos, &(north.len() as i32), conflicts); [INFO] [stdout] | ^^^^^^ help: change this to: `south` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:123:32 [INFO] [stdout] | [INFO] [stdout] 123 | prev_north_pos = next_north_pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_north_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | if bl_preds.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bl_preds.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:69:27 [INFO] [stdout] | [INFO] [stdout] 69 | let bl_pred_order = bl_pred.order.clone().unwrap_or(0) as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `bl_pred.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:70:27 [INFO] [stdout] | [INFO] [stdout] 70 | let br_pred_order = br_pred.order.clone().unwrap_or(0) as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `br_pred.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:80:30 [INFO] [stdout] | [INFO] [stdout] 80 | fn expand_subgraphs(entries: &mut Vec, subgraphs: &OrderedHashMap) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - fn expand_subgraphs(entries: &mut Vec, subgraphs: &OrderedHashMap) { [INFO] [stdout] 80 + fn expand_subgraphs(entries: &mut [ResolvedBaryEntry], subgraphs: &OrderedHashMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:89:16 [INFO] [stdout] | [INFO] [stdout] 89 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:99:27 [INFO] [stdout] | [INFO] [stdout] 99 | let target_barycenter = target.barycenter.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:101:25 [INFO] [stdout] | [INFO] [stdout] 101 | let target_weight = target.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:107:42 [INFO] [stdout] | [INFO] [stdout] 107 | target.weight = Some(target_weight + other.weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:109:30 [INFO] [stdout] | [INFO] [stdout] 109 | target.barycenter = Some(other.barycenter.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | target.weight = Some(other.weight.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/barycenter.rs:11:74 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn barycenter(g: &Graph, movable: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - pub fn barycenter(g: &Graph, movable: &Vec) -> Vec { [INFO] [stdout] 11 + pub fn barycenter(g: &Graph, movable: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:155:95 [INFO] [stdout] | [INFO] [stdout] 155 | pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &String, w_: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 155 ~ pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &str, w_: &String) { [INFO] [stdout] 156 ~ let mut v = v_.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:155:108 [INFO] [stdout] | [INFO] [stdout] 155 | pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &String, w_: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 155 ~ pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &String, w_: &str) { [INFO] [stdout] 156 | let mut v = v_.clone(); [INFO] [stdout] 157 ~ let mut w = w_.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `v` and `w` manually [INFO] [stdout] --> src/layout/position/bk.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | / let tmp = v; [INFO] [stdout] 160 | | v = w; [INFO] [stdout] 161 | | w = tmp; [INFO] [stdout] | |____________^ help: try: `std::mem::swap(&mut v, &mut w);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `v` and `w` manually [INFO] [stdout] --> src/layout/position/bk.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / let tmp = v; [INFO] [stdout] 178 | | v = w; [INFO] [stdout] 179 | | w = tmp; [INFO] [stdout] | |____________^ help: try: `std::mem::swap(&mut v, &mut w);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:199:16 [INFO] [stdout] | [INFO] [stdout] 199 | neighbor_fn: Box, &String) -> Vec> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:244:3 [INFO] [stdout] | [INFO] [stdout] 244 | return (root, align.into_values()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 244 - return (root, align.into_values()); [INFO] [stdout] 244 + (root, align.into_values()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | layering: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 197 - layering: &Vec>, [INFO] [stdout] 197 + layering: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:220:10 [INFO] [stdout] | [INFO] [stdout] 220 | if ws.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ws.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:235:24 [INFO] [stdout] | [INFO] [stdout] 235 | prev_idx = pos.get(&w).unwrap().clone() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*pos.get(&w).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:251:10 [INFO] [stdout] | [INFO] [stdout] 251 | align: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 251 - align: &Vec, [INFO] [stdout] 251 + align: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:268:18 [INFO] [stdout] | [INFO] [stdout] 268 | ...c: fn(&String, &mut OrderedHashMap,&Graph, &Graph, &BorderTypeName), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:269:22 [INFO] [stdout] | [INFO] [stdout] 269 | next_nodes_func: Box, &String) -> Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:302:77 [INFO] [stdout] | [INFO] [stdout] 302 | let ev: f32 = xs.get(&e.v).cloned().unwrap() + (block_g.edge_with_obj(&e).cloned().unwrap_or(0.0)); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:318:77 [INFO] [stdout] | [INFO] [stdout] 318 | let ev: f32 = xs.get(&e.w).cloned().unwrap() - (block_g.edge_with_obj(&e).cloned().unwrap_or(0.0)); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:339:42 [INFO] [stdout] | [INFO] [stdout] 339 | xs.insert(v.clone(), xs.get(root.get(&v).unwrap()).cloned().unwrap()); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:345:82 [INFO] [stdout] | [INFO] [stdout] 345 | pub fn build_block_graph(g: &Graph, layering: &Vec>, root: &OrderedHashMap, layering: &Vec>, root: &OrderedHashMap, reverse_sep: bool) -> Graph { [INFO] [stdout] 345 + pub fn build_block_graph(g: &Graph, layering: &[Vec], root: &OrderedHashMap, reverse_sep: bool) -> Graph { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:348:15 [INFO] [stdout] | [INFO] [stdout] 348 | let sep_fn: Box, &String, &String) -> f32> = sep( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `u` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:360:18 [INFO] [stdout] | [INFO] [stdout] 359 | if u.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = &u` [INFO] [stdout] 360 | let u_ = u.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:363:11 [INFO] [stdout] | [INFO] [stdout] 363 | &u_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `u_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:364:11 [INFO] [stdout] | [INFO] [stdout] 364 | &v_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `v_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:369:11 [INFO] [stdout] | [INFO] [stdout] 369 | &u_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `u_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:370:11 [INFO] [stdout] | [INFO] [stdout] 370 | &v_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `v_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/layout/position/bk.rs:371:16 [INFO] [stdout] | [INFO] [stdout] 371 | Some((sep_fn(g, v, u_) as f32).max(prev_max)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sep_fn(g, v, u_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/barycenter.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / return Barycenter { [INFO] [stdout] 33 | | v: v.clone(), [INFO] [stdout] 34 | | barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] 35 | | weight: Some(result.1 as f32) [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 ~ Barycenter { [INFO] [stdout] 33 + v: v.clone(), [INFO] [stdout] 34 + barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] 35 + weight: Some(result.1 as f32) [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/barycenter.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | if in_v.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `in_v.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/order/barycenter.rs:25:34 [INFO] [stdout] | [INFO] [stdout] 25 | let edge = g.edge_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | let edge_weight = edge.weight.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:28:34 [INFO] [stdout] | [INFO] [stdout] 28 | result.0 += edge_weight * (node_u.order.clone().unwrap_or(0) as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node_u.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:34:24 [INFO] [stdout] | [INFO] [stdout] 34 | barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/barycenter.rs:34:50 [INFO] [stdout] | [INFO] [stdout] 34 | barycenter: Some(result.0.clone() as f32 / result.1.clone() as f32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `result.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:80:3 [INFO] [stdout] | [INFO] [stdout] 80 | return do_resolve_conflicts(&mut source_set); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 80 - return do_resolve_conflicts(&mut source_set); [INFO] [stdout] 80 + do_resolve_conflicts(&mut source_set) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:43:36 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn resolve_conflicts (entries: &Vec, cg: &Graph) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - pub fn resolve_conflicts (entries: &Vec, cg: &Graph) -> Vec { [INFO] [stdout] 43 + pub fn resolve_conflicts (entries: &[Barycenter], cg: &Graph) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | mapped_entry.barycenter = entry.barycenter.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:58:29 [INFO] [stdout] | [INFO] [stdout] 58 | mapped_entry.weight = entry.weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:131:3 [INFO] [stdout] | [INFO] [stdout] 131 | / return entries.into_iter().filter(|entry| { [INFO] [stdout] 132 | | !entry.merged.clone().unwrap_or(false) [INFO] [stdout] 133 | | }).collect(); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 ~ entries.into_iter().filter(|entry| { [INFO] [stdout] 132 + !entry.merged.clone().unwrap_or(false) [INFO] [stdout] 133 ~ }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:88:24 [INFO] [stdout] | [INFO] [stdout] 88 | source_hash.insert(entry.i.clone(), entry.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:100:10 [INFO] [stdout] | [INFO] [stdout] 100 | || u_entry.barycenter.clone().unwrap_or(0.0) >= v_entry.barycenter.clone().unwrap_or(0.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `u_entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:100:55 [INFO] [stdout] | [INFO] [stdout] 100 | || u_entry.barycenter.clone().unwrap_or(0.0) >= v_entry.barycenter.clone().unwrap_or(0.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | while source_set.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!source_set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:132:6 [INFO] [stdout] | [INFO] [stdout] 132 | !entry.merged.clone().unwrap_or(false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.merged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:142:25 [INFO] [stdout] | [INFO] [stdout] 142 | let target_weight = target_.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target_.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:143:29 [INFO] [stdout] | [INFO] [stdout] 143 | let target_barycenter = target_.barycenter.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target_.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:150:25 [INFO] [stdout] | [INFO] [stdout] 150 | let source_weight = source_.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `source_.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | let source_barycenter = source_.barycenter.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `source_.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:425:22 [INFO] [stdout] | [INFO] [stdout] 425 | let align_to_min = align_to_vals.iter().min_by(|a, b| a.partial_cmp(b).unwrap()).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*align_to_vals.iter().min_by(|a, b| a.partial_cmp(b).unwrap()).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:426:22 [INFO] [stdout] | [INFO] [stdout] 426 | let align_to_max = align_to_vals.iter().max_by(|a, b| a.partial_cmp(b).unwrap()).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*align_to_vals.iter().max_by(|a, b| a.partial_cmp(b).unwrap()).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:163:28 [INFO] [stdout] | [INFO] [stdout] 163 | target.i = std::cmp::min(source_.i.clone(), target_.i.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `source_.i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:163:47 [INFO] [stdout] | [INFO] [stdout] 163 | target.i = std::cmp::min(source_.i.clone(), target_.i.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `target_.i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort.rs:43:3 [INFO] [stdout] | [INFO] [stdout] 43 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 43 - return result; [INFO] [stdout] 43 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/order/sort.rs:37:3 [INFO] [stdout] | [INFO] [stdout] 37 | result.vs = vs; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `layout::order::sort_subgraph::SubgraphResult { vs: vs, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/order/sort.rs:36:3 [INFO] [stdout] | [INFO] [stdout] 36 | let mut result = SubgraphResult::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | let entry_weight = entry.weight.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | sum += entry.barycenter.clone().unwrap_or(0.0) * entry_weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:31:54 [INFO] [stdout] | [INFO] [stdout] 31 | sum += entry.barycenter.clone().unwrap_or(0.0) * entry_weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | weight += entry_weight.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_weight` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort.rs:56:3 [INFO] [stdout] | [INFO] [stdout] 56 | return index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return index.clone(); [INFO] [stdout] 56 + index.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:530:3 [INFO] [stdout] | [INFO] [stdout] 530 | return balance(&xss, g.graph().align.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 530 - return balance(&xss, g.graph().align.clone()); [INFO] [stdout] 530 + balance(&xss, g.graph().align.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort.rs:47:6 [INFO] [stdout] | [INFO] [stdout] 47 | if unsortable.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `unsortable.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | return index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `unsortable.get(unsortable.len() - 1)` [INFO] [stdout] --> src/layout/order/sort.rs:50:37 [INFO] [stdout] | [INFO] [stdout] 50 | let mut last: ResolvedBaryEntry = unsortable.get(unsortable.len() - 1).cloned().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unsortable.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | while unsortable.len() > 0 && &last.i <= index { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!unsortable.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:505:24 [INFO] [stdout] | [INFO] [stdout] 505 | let neighbor_fn: Box, &String) -> Vec> = if vert == &"u" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | return index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/sort.rs:68:3 [INFO] [stdout] | [INFO] [stdout] 68 | / return if !bias { [INFO] [stdout] 69 | | entry_v.i.cmp(&entry_w.i) [INFO] [stdout] 70 | | } else { [INFO] [stdout] 71 | | entry_w.i.cmp(&entry_v.i) [INFO] [stdout] 72 | | } [INFO] [stdout] | |___^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 68 ~ if !bias { [INFO] [stdout] 69 + entry_v.i.cmp(&entry_w.i) [INFO] [stdout] 70 + } else { [INFO] [stdout] 71 + entry_w.i.cmp(&entry_v.i) [INFO] [stdout] 72 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:60:22 [INFO] [stdout] | [INFO] [stdout] 60 | let barycenter_v = entry_v.barycenter.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_v.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort.rs:61:22 [INFO] [stdout] | [INFO] [stdout] 61 | let barycenter_w = entry_w.barycenter.clone().unwrap_or(0.0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `entry_w.barycenter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:519:34 [INFO] [stdout] | [INFO] [stdout] 519 | xs_.insert(k.clone(), -v.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/layout/position/bk.rs:524:18 [INFO] [stdout] | [INFO] [stdout] 524 | xss.insert(String::from(vert.to_string() + horiz), xs); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `(vert.to_string() + horiz)` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | vs: &Vec [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 8 - vs: &Vec [INFO] [stdout] 8 + vs: &[String] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:533:63 [INFO] [stdout] | [INFO] [stdout] 533 | ... reverse_sep: &bool) -> Box, &String, &String) -> f32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:534:19 [INFO] [stdout] | [INFO] [stdout] 534 | let node_sep_ = node_sep.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*node_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:535:19 [INFO] [stdout] | [INFO] [stdout] 535 | let edge_sep_ = edge_sep.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*edge_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:536:22 [INFO] [stdout] | [INFO] [stdout] 536 | let reverse_sep_ = reverse_sep.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*reverse_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | return (); [INFO] [stdout] | ^^ help: remove the `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/cross_count.rs:30:3 [INFO] [stdout] | [INFO] [stdout] 30 | return cc; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 30 - return cc; [INFO] [stdout] 30 + cc [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/cross_count.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | layering: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - layering: &mut Vec>, [INFO] [stdout] 35 + layering: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/cross_count.rs:43:34 [INFO] [stdout] | [INFO] [stdout] 43 | let south_layer = layering.get(south_idx.clone()).cloned().unwrap_or(vec![]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*south_idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/mod.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | g.node_mut(v).unwrap().x = x.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/cross_count.rs:49:55 [INFO] [stdout] | [INFO] [stdout] 49 | let south_entries: Vec<(usize, f32)> = layering.get(north_idx.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*north_idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/mod.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | let rank_sep = g.graph().ranksep.clone().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.graph().ranksep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/mod.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | if layout_graph.children(&v).len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!layout_graph.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/mod.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | / return ranks.iter().map(|rank| { [INFO] [stdout] 78 | | build_layer_graph(g, rank, relationship) [INFO] [stdout] 79 | | }).collect() [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 77 ~ ranks.iter().map(|rank| { [INFO] [stdout] 78 + build_layer_graph(g, rank, relationship) [INFO] [stdout] 79 + }).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:76:80 [INFO] [stdout] | [INFO] [stdout] 76 | fn build_layer_graphs(g: &mut Graph, ranks: &Vec, relationship: GraphRelationship) -> Vec, ranks: &Vec, relationship: GraphRelationship) -> Vec> { [INFO] [stdout] 76 + fn build_layer_graphs(g: &mut Graph, ranks: &[i32], relationship: GraphRelationship) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:82:37 [INFO] [stdout] | [INFO] [stdout] 82 | fn sweep_layer_graphs(layer_graphs: &mut Vec>, bias_right: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - fn sweep_layer_graphs(layer_graphs: &mut Vec>, bias_right: bool) { [INFO] [stdout] 82 + fn sweep_layer_graphs(layer_graphs: &mut [Graph], bias_right: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/mod.rs:148:3 [INFO] [stdout] | [INFO] [stdout] 148 | return g; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 148 - return g; [INFO] [stdout] 148 + g [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | let w = node.width.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/coordinate_system.rs:35:42 [INFO] [stdout] | [INFO] [stdout] 35 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | let w = edge_label.width.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/coordinate_system.rs:53:42 [INFO] [stdout] | [INFO] [stdout] 53 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:202:10 [INFO] [stdout] | [INFO] [stdout] 202 | if edge.width.clone().unwrap_or(0.0) > 0.0 && edge.height.clone().unwrap_or(0.0) > 0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:202:53 [INFO] [stdout] | [INFO] [stdout] 202 | if edge.width.clone().unwrap_or(0.0) > 0.0 && edge.height.clone().unwrap_or(0.0) > 0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | let x = node.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/mod.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | label.rank = Some((w_rank - v_rank) / 2 + v_rank); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { rank: Some((w_rank - v_rank) / 2 + v_rank), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/mod.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | let mut label = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/coordinate_system.rs:76:42 [INFO] [stdout] | [INFO] [stdout] 76 | let edge_label = g.edge_mut_with_obj(&e).unwrap(); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:79:15 [INFO] [stdout] | [INFO] [stdout] 79 | let x = point.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `point.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:232:29 [INFO] [stdout] | [INFO] [stdout] 232 | _node.max_rank = Some(_max_rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `_max_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/coordinate_system.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | let x = edge_label.x.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge_label.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `edge.points` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/mod.rs:316:16 [INFO] [stdout] | [INFO] [stdout] 315 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 316 | for p in edge.points.as_mut().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:30:86 [INFO] [stdout] | [INFO] [stdout] 30 | fn find_type_1_conflicts(g: &mut Graph, layering: &Vec>) -> OrderedHashMap, layering: &Vec>) -> OrderedHashMap> { [INFO] [stdout] 30 + fn find_type_1_conflicts(g: &mut Graph, layering: &[Vec]) -> OrderedHashMap> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:404:25 [INFO] [stdout] | [INFO] [stdout] 404 | let labeloffset = edge.labeloffset.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.labeloffset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | prev_layer: &Vec, layer: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - prev_layer: &Vec, layer: &Vec, [INFO] [stdout] 35 + prev_layer: &[String], layer: &Vec, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:410:19 [INFO] [stdout] | [INFO] [stdout] 410 | edge.x -= edge.width.clone().unwrap_or(0.0) / 2.0 + labeloffset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:412:19 [INFO] [stdout] | [INFO] [stdout] 412 | edge.x += edge.width.clone().unwrap_or(0.0) / 2.0 + labeloffset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:35:38 [INFO] [stdout] | [INFO] [stdout] 35 | prev_layer: &Vec, layer: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - prev_layer: &Vec, layer: &Vec, [INFO] [stdout] 35 + prev_layer: &Vec, layer: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | visit_layer(g, &prev_layer, layer, &mut conflicts); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `prev_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `edge.points` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/mod.rs:423:22 [INFO] [stdout] | [INFO] [stdout] 422 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 423 | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | layering: &Vec> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - layering: &Vec> [INFO] [stdout] 82 + layering: &[Vec] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:86:68 [INFO] [stdout] | [INFO] [stdout] 86 | fn scan(g: &mut Graph, south: &Vec, south_pos: &usize, south_end: &usize, prev_north_bo... [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 86 - fn scan(g: &mut Graph, south: &Vec, south_pos: &usize, south_end: &usize, prev_north_border: &i32, next_north_border: &i32, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] 86 + fn scan(g: &mut Graph, south: &[String], south_pos: &usize, south_end: &usize, prev_north_border: &i32, next_north_border: &i32, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout/mod.rs:421:5 [INFO] [stdout] | [INFO] [stdout] 421 | / if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] 422 | | if edge.points.is_some() { [INFO] [stdout] 423 | | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 424 | | points.reverse(); [INFO] [stdout] 425 | | } [INFO] [stdout] 426 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 421 ~ if edge.reversed.clone().unwrap_or(false) [INFO] [stdout] 422 ~ && edge.points.is_some() { [INFO] [stdout] 423 | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 424 | points.reverse(); [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in south_pos.clone()..south_end.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*south_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:421:8 [INFO] [stdout] | [INFO] [stdout] 421 | if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.reversed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:87:33 [INFO] [stdout] | [INFO] [stdout] 87 | for i in south_pos.clone()..south_end.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*south_end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/mod.rs:432:8 [INFO] [stdout] | [INFO] [stdout] 432 | if g.children(&v).len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!g.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:94:32 [INFO] [stdout] | [INFO] [stdout] 94 | let u_node_order = u_node.order.clone().unwrap_or(0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `u_node.order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `predecessors_` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:118:32 [INFO] [stdout] | [INFO] [stdout] 117 | if predecessors_.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = predecessors_` [INFO] [stdout] 118 | let predecessors = predecessors_.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:106:75 [INFO] [stdout] | [INFO] [stdout] 106 | fn visit_layer(g: &mut Graph, north: &Vec, south: &Vec, conflicts: &mut Ordere... [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 106 - fn visit_layer(g: &mut Graph, north: &Vec, south: &Vec, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] 106 + fn visit_layer(g: &mut Graph, north: &[String], south: &Vec, conflicts: &mut OrderedHashMap>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:119:16 [INFO] [stdout] | [INFO] [stdout] 119 | if predecessors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!predecessors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:120:32 [INFO] [stdout] | [INFO] [stdout] 120 | next_north_pos = g.node(&predecessors[0]).unwrap().order.clone().unwrap_or(0) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.node(&predecessors[0]).unwrap().order` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:121:23 [INFO] [stdout] | [INFO] [stdout] 121 | scan(g, &south, &south_pos, &south.len(), &next_north_pos, &(north.len() as i32), conflicts); [INFO] [stdout] | ^^^^^^ help: change this to: `south` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:123:32 [INFO] [stdout] | [INFO] [stdout] 123 | prev_north_pos = next_north_pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `next_north_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:482:18 [INFO] [stdout] | [INFO] [stdout] 482 | let rank = node.rank.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/mod.rs:487:9 [INFO] [stdout] | [INFO] [stdout] 487 | _graph_node.width = graph_edge.width.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { width: graph_edge.width.clone().unwrap_or(0.0), height: graph_edge.height.clone().unwrap_or(0.0), rank: rank.clone(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/mod.rs:486:9 [INFO] [stdout] | [INFO] [stdout] 486 | let mut _graph_node = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:487:29 [INFO] [stdout] | [INFO] [stdout] 487 | _graph_node.width = graph_edge.width.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph_edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:488:30 [INFO] [stdout] | [INFO] [stdout] 488 | _graph_node.height = graph_edge.height.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph_edge.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:489:28 [INFO] [stdout] | [INFO] [stdout] 489 | _graph_node.rank = rank.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:155:95 [INFO] [stdout] | [INFO] [stdout] 155 | pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &String, w_: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 155 ~ pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &str, w_: &String) { [INFO] [stdout] 156 ~ let mut v = v_.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:155:108 [INFO] [stdout] | [INFO] [stdout] 155 | pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &String, w_: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 155 ~ pub fn add_conflict(conflicts: &mut OrderedHashMap>, v_: &String, w_: &str) { [INFO] [stdout] 156 | let mut v = v_.clone(); [INFO] [stdout] 157 ~ let mut w = w_.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `v` and `w` manually [INFO] [stdout] --> src/layout/position/bk.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | / let tmp = v; [INFO] [stdout] 160 | | v = w; [INFO] [stdout] 161 | | w = tmp; [INFO] [stdout] | |____________^ help: try: `std::mem::swap(&mut v, &mut w);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `v` and `w` manually [INFO] [stdout] --> src/layout/position/bk.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / let tmp = v; [INFO] [stdout] 178 | | v = w; [INFO] [stdout] 179 | | w = tmp; [INFO] [stdout] | |____________^ help: try: `std::mem::swap(&mut v, &mut w);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:199:16 [INFO] [stdout] | [INFO] [stdout] 199 | neighbor_fn: Box, &String) -> Vec> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:244:3 [INFO] [stdout] | [INFO] [stdout] 244 | return (root, align.into_values()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 244 - return (root, align.into_values()); [INFO] [stdout] 244 + (root, align.into_values()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:197:13 [INFO] [stdout] | [INFO] [stdout] 197 | layering: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 197 - layering: &Vec>, [INFO] [stdout] 197 + layering: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:220:10 [INFO] [stdout] | [INFO] [stdout] 220 | if ws.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ws.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:235:24 [INFO] [stdout] | [INFO] [stdout] 235 | prev_idx = pos.get(&w).unwrap().clone() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*pos.get(&w).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:251:10 [INFO] [stdout] | [INFO] [stdout] 251 | align: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 251 - align: &Vec, [INFO] [stdout] 251 + align: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:268:18 [INFO] [stdout] | [INFO] [stdout] 268 | ...c: fn(&String, &mut OrderedHashMap,&Graph, &Graph, &BorderTypeName), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:269:22 [INFO] [stdout] | [INFO] [stdout] 269 | next_nodes_func: Box, &String) -> Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:302:77 [INFO] [stdout] | [INFO] [stdout] 302 | let ev: f32 = xs.get(&e.v).cloned().unwrap() + (block_g.edge_with_obj(&e).cloned().unwrap_or(0.0)); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:318:77 [INFO] [stdout] | [INFO] [stdout] 318 | let ev: f32 = xs.get(&e.w).cloned().unwrap() - (block_g.edge_with_obj(&e).cloned().unwrap_or(0.0)); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:339:42 [INFO] [stdout] | [INFO] [stdout] 339 | xs.insert(v.clone(), xs.get(root.get(&v).unwrap()).cloned().unwrap()); [INFO] [stdout] | ^^ help: change this to: `v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:345:82 [INFO] [stdout] | [INFO] [stdout] 345 | pub fn build_block_graph(g: &Graph, layering: &Vec>, root: &OrderedHashMap, layering: &Vec>, root: &OrderedHashMap, reverse_sep: bool) -> Graph { [INFO] [stdout] 345 + pub fn build_block_graph(g: &Graph, layering: &[Vec], root: &OrderedHashMap, reverse_sep: bool) -> Graph { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:348:15 [INFO] [stdout] | [INFO] [stdout] 348 | let sep_fn: Box, &String, &String) -> f32> = sep( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `u` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:360:18 [INFO] [stdout] | [INFO] [stdout] 359 | if u.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = &u` [INFO] [stdout] 360 | let u_ = u.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:363:11 [INFO] [stdout] | [INFO] [stdout] 363 | &u_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `u_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:364:11 [INFO] [stdout] | [INFO] [stdout] 364 | &v_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `v_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:369:11 [INFO] [stdout] | [INFO] [stdout] 369 | &u_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `u_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:370:11 [INFO] [stdout] | [INFO] [stdout] 370 | &v_root, [INFO] [stdout] | ^^^^^^^ help: change this to: `v_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/layout/position/bk.rs:371:16 [INFO] [stdout] | [INFO] [stdout] 371 | Some((sep_fn(g, v, u_) as f32).max(prev_max)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sep_fn(g, v, u_)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | result.vs = vec![vec![bl_.clone()], result.vs.clone(), vec![br_.clone()]].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[vec![bl_.clone()], result.vs.clone(), vec![br_.clone()]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:425:22 [INFO] [stdout] | [INFO] [stdout] 425 | let align_to_min = align_to_vals.iter().min_by(|a, b| a.partial_cmp(b).unwrap()).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*align_to_vals.iter().min_by(|a, b| a.partial_cmp(b).unwrap()).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:428:3 [INFO] [stdout] | [INFO] [stdout] 428 | vec!["u", "d"].iter().for_each(|vert| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["u", "d"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:426:22 [INFO] [stdout] | [INFO] [stdout] 426 | let align_to_max = align_to_vals.iter().max_by(|a, b| a.partial_cmp(b).unwrap()).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*align_to_vals.iter().max_by(|a, b| a.partial_cmp(b).unwrap()).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:429:5 [INFO] [stdout] | [INFO] [stdout] 429 | vec!["l", "r"].iter().for_each(|horiz| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["l", "r"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:489:3 [INFO] [stdout] | [INFO] [stdout] 489 | vec!["u", "d"].iter().for_each(|vert| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["u", "d"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:498:5 [INFO] [stdout] | [INFO] [stdout] 498 | vec!["l", "r"].iter().for_each(|horiz| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["l", "r"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/layout/util.rs:261:66 [INFO] [stdout] | [INFO] [stdout] 261 | return add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` 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: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/layout/order/mod.rs:85:60 [INFO] [stdout] | [INFO] [stdout] 85 | let root = lg.graph().root.clone().unwrap_or(GRAPH_NODE.clone().to_string()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:530:3 [INFO] [stdout] | [INFO] [stdout] 530 | return balance(&xss, g.graph().align.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 530 - return balance(&xss, g.graph().align.clone()); [INFO] [stdout] 530 + balance(&xss, g.graph().align.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:505:24 [INFO] [stdout] | [INFO] [stdout] 505 | let neighbor_fn: Box, &String) -> Vec> = if vert == &"u" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:519:34 [INFO] [stdout] | [INFO] [stdout] 519 | xs_.insert(k.clone(), -v.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/layout/position/bk.rs:524:18 [INFO] [stdout] | [INFO] [stdout] 524 | xss.insert(String::from(vert.to_string() + horiz), xs); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `(vert.to_string() + horiz)` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:533:63 [INFO] [stdout] | [INFO] [stdout] 533 | ... reverse_sep: &bool) -> Box, &String, &String) -> f32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:534:19 [INFO] [stdout] | [INFO] [stdout] 534 | let node_sep_ = node_sep.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*node_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:535:19 [INFO] [stdout] | [INFO] [stdout] 535 | let edge_sep_ = edge_sep.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*edge_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:536:22 [INFO] [stdout] | [INFO] [stdout] 536 | let reverse_sep_ = reverse_sep.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*reverse_sep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/mod.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | g.node_mut(v).unwrap().x = x.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/mod.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | let rank_sep = g.graph().ranksep.clone().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `g.graph().ranksep` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/mod.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | if layout_graph.children(&v).len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!layout_graph.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/mod.rs:148:3 [INFO] [stdout] | [INFO] [stdout] 148 | return g; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 148 - return g; [INFO] [stdout] 148 + g [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:202:10 [INFO] [stdout] | [INFO] [stdout] 202 | if edge.width.clone().unwrap_or(0.0) > 0.0 && edge.height.clone().unwrap_or(0.0) > 0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:202:53 [INFO] [stdout] | [INFO] [stdout] 202 | if edge.width.clone().unwrap_or(0.0) > 0.0 && edge.height.clone().unwrap_or(0.0) > 0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/mod.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | label.rank = Some((w_rank - v_rank) / 2 + v_rank); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { rank: Some((w_rank - v_rank) / 2 + v_rank), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/mod.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | let mut label = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:232:29 [INFO] [stdout] | [INFO] [stdout] 232 | _node.max_rank = Some(_max_rank.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `_max_rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `edge.points` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/mod.rs:316:16 [INFO] [stdout] | [INFO] [stdout] 315 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 316 | for p in edge.points.as_mut().unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:404:25 [INFO] [stdout] | [INFO] [stdout] 404 | let labeloffset = edge.labeloffset.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.labeloffset` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:410:19 [INFO] [stdout] | [INFO] [stdout] 410 | edge.x -= edge.width.clone().unwrap_or(0.0) / 2.0 + labeloffset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:412:19 [INFO] [stdout] | [INFO] [stdout] 412 | edge.x += edge.width.clone().unwrap_or(0.0) / 2.0 + labeloffset; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `edge.points` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/mod.rs:423:22 [INFO] [stdout] | [INFO] [stdout] 422 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 423 | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout/mod.rs:421:5 [INFO] [stdout] | [INFO] [stdout] 421 | / if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] 422 | | if edge.points.is_some() { [INFO] [stdout] 423 | | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 424 | | points.reverse(); [INFO] [stdout] 425 | | } [INFO] [stdout] 426 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 421 ~ if edge.reversed.clone().unwrap_or(false) [INFO] [stdout] 422 ~ && edge.points.is_some() { [INFO] [stdout] 423 | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 424 | points.reverse(); [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:421:8 [INFO] [stdout] | [INFO] [stdout] 421 | if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `edge.reversed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/mod.rs:432:8 [INFO] [stdout] | [INFO] [stdout] 432 | if g.children(&v).len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!g.children(&v).is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:482:18 [INFO] [stdout] | [INFO] [stdout] 482 | let rank = node.rank.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `node.rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/mod.rs:487:9 [INFO] [stdout] | [INFO] [stdout] 487 | _graph_node.width = graph_edge.width.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `GraphNode { width: graph_edge.width.clone().unwrap_or(0.0), height: graph_edge.height.clone().unwrap_or(0.0), rank: rank.clone(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/layout/mod.rs:486:9 [INFO] [stdout] | [INFO] [stdout] 486 | let mut _graph_node = GraphNode::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:487:29 [INFO] [stdout] | [INFO] [stdout] 487 | _graph_node.width = graph_edge.width.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph_edge.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:488:30 [INFO] [stdout] | [INFO] [stdout] 488 | _graph_node.height = graph_edge.height.clone().unwrap_or(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `graph_edge.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:489:28 [INFO] [stdout] | [INFO] [stdout] 489 | _graph_node.rank = rank.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `rank` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | result.vs = vec![vec![bl_.clone()], result.vs.clone(), vec![br_.clone()]].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[vec![bl_.clone()], result.vs.clone(), vec![br_.clone()]]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:428:3 [INFO] [stdout] | [INFO] [stdout] 428 | vec!["u", "d"].iter().for_each(|vert| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["u", "d"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:429:5 [INFO] [stdout] | [INFO] [stdout] 429 | vec!["l", "r"].iter().for_each(|horiz| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["l", "r"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:489:3 [INFO] [stdout] | [INFO] [stdout] 489 | vec!["u", "d"].iter().for_each(|vert| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["u", "d"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:498:5 [INFO] [stdout] | [INFO] [stdout] 498 | vec!["l", "r"].iter().for_each(|horiz| { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `["l", "r"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/layout/util.rs:261:66 [INFO] [stdout] | [INFO] [stdout] 261 | return add_dummy_node(graph, "border".to_string(), node, prefix.clone().to_string()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` 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: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/layout/order/mod.rs:85:60 [INFO] [stdout] | [INFO] [stdout] 85 | let root = lg.graph().root.clone().unwrap_or(GRAPH_NODE.clone().to_string()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.12s [INFO] running `Command { std: "docker" "inspect" "ce941b9365d085f59ff5a40b461e861a78d0dec6e7dd288ed492a7d1ccc71383", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ce941b9365d085f59ff5a40b461e861a78d0dec6e7dd288ed492a7d1ccc71383", kill_on_drop: false }` [INFO] [stdout] ce941b9365d085f59ff5a40b461e861a78d0dec6e7dd288ed492a7d1ccc71383