[INFO] cloning repository https://github.com/MilkBlock/dagviz [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/MilkBlock/dagviz" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMilkBlock%2Fdagviz", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMilkBlock%2Fdagviz'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 77ff691a620619b15ecca1fe62b9e312e9e6d4a2 [INFO] linting MilkBlock/dagviz against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMilkBlock%2Fdagviz" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/MilkBlock/dagviz [INFO] finished tweaking git repo https://github.com/MilkBlock/dagviz [INFO] tweaked toml for git repo https://github.com/MilkBlock/dagviz written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/MilkBlock/dagviz on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/MilkBlock/dagviz already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded graphlib_rust v0.0.2 [INFO] [stderr] Downloaded ordered_hashmap v0.0.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] e888543bd63cc84c8b18e102b9744a97d8edddf766739e523003eba79b7c4a96 [INFO] running `Command { std: "docker" "start" "-a" "e888543bd63cc84c8b18e102b9744a97d8edddf766739e523003eba79b7c4a96", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e888543bd63cc84c8b18e102b9744a97d8edddf766739e523003eba79b7c4a96", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e888543bd63cc84c8b18e102b9744a97d8edddf766739e523003eba79b7c4a96", kill_on_drop: false }` [INFO] [stdout] e888543bd63cc84c8b18e102b9744a97d8edddf766739e523003eba79b7c4a96 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 07f029eb298b2b30d3ff687f0c42309e6d1f9e2b3e6df15cbe87f5d4fe2b04d5 [INFO] running `Command { std: "docker" "start" "-a" "07f029eb298b2b30d3ff687f0c42309e6d1f9e2b3e6df15cbe87f5d4fe2b04d5", kill_on_drop: false }` [INFO] [stderr] Checking ordered_hashmap v0.0.3 [INFO] [stderr] Checking graphlib_rust v0.0.2 [INFO] [stderr] Checking dagviz v0.0.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/ordered_hashmap/mod.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | / /// Gets a mutable reference to the value of the specified key. [INFO] [stdout] 91 | | ////// [INFO] [stdout] 92 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn get_mut(&mut self, key: &K) -> Option<&mut V> { [INFO] [stdout] | -------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `get_mut` then comment it out [INFO] [stdout] | [INFO] [stdout] 90 | // /// Gets a mutable reference to the value of the specified key. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/ordered_hashmap/mod.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | / /// Gets a mutable reference to the value of the specified key. [INFO] [stdout] 91 | | ////// [INFO] [stdout] 92 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn get_mut(&mut self, key: &K) -> Option<&mut V> { [INFO] [stdout] | -------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `get_mut` then comment it out [INFO] [stdout] | [INFO] [stdout] 90 | // /// Gets a mutable reference to the value of the specified key. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `prev_north_pos` is assigned to, but never used [INFO] [stdout] --> src/layout/position/bk.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | let mut prev_north_pos = -1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_prev_north_pos` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) 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:153:29 [INFO] [stdout] | [INFO] [stdout] 153 | ... prev_north_pos = next_north_pos.clone(); [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: variable `prev_north_pos` is assigned to, but never used [INFO] [stdout] --> src/layout/position/bk.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | let mut prev_north_pos = -1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_prev_north_pos` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) 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:153:29 [INFO] [stdout] | [INFO] [stdout] 153 | ... prev_north_pos = next_north_pos.clone(); [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/position/bk.rs:708:13 [INFO] [stdout] | [INFO] [stdout] 708 | delta = 0.0; [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:119:19 [INFO] [stdout] | [INFO] [stdout] 119 | .min_by(|(e1, e1_), (e2, e2_)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_e1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e2` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:119:30 [INFO] [stdout] | [INFO] [stdout] 119 | .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:118:19 [INFO] [stdout] | [INFO] [stdout] 118 | .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 `delta` is never read [INFO] [stdout] --> src/layout/position/bk.rs:708:13 [INFO] [stdout] | [INFO] [stdout] 708 | delta = 0.0; [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:119:19 [INFO] [stdout] | [INFO] [stdout] 119 | .min_by(|(e1, e1_), (e2, e2_)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_e1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e2` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:119:30 [INFO] [stdout] | [INFO] [stdout] 119 | .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:118:19 [INFO] [stdout] | [INFO] [stdout] 118 | .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: this creates an owned instance just for comparison [INFO] [stdout] --> src/layout/acyclic.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | && 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: unneeded `return` statement [INFO] [stdout] --> src/layout/acyclic.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | 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] 71 - return fas; [INFO] [stdout] 71 + fas [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/acyclic.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | 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:77:12 [INFO] [stdout] | [INFO] [stdout] 77 | 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: length comparison to zero [INFO] [stdout] --> src/layout/add_border_segments.rs:16:12 [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] = note: `#[warn(clippy::len_zero)]` on by default [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:28 [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:28 [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:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | 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:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | 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] = note: `#[warn(clippy::field_reassign_with_default)]` on by 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:48:23 [INFO] [stdout] | [INFO] [stdout] 48 | 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:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / match prop { [INFO] [stdout] 56 | | BorderTypeName::BorderRight => { [INFO] [stdout] 57 | | border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [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] 55 ~ if prop == BorderTypeName::BorderRight { [INFO] [stdout] 56 + border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] 57 + } [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:61:19 [INFO] [stdout] | [INFO] [stdout] 61 | 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:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | 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:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | 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 `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] = note: `#[warn(clippy::needless_borrow)]` on by default [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 `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: 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: this creates an owned instance just for comparison [INFO] [stdout] --> src/layout/acyclic.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | && 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: implicitly performing saturating subtraction [INFO] [stdout] --> src/layout/nesting_graph.rs:39:5 [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:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | 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] 95 - return depths; [INFO] [stdout] 95 + depths [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/acyclic.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | 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] 71 - return fas; [INFO] [stdout] 71 + fas [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/acyclic.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | 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: called `unwrap` on `border_bottom` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/nesting_graph.rs:151:28 [INFO] [stdout] | [INFO] [stdout] 150 | if border_bottom.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = border_bottom` [INFO] [stdout] 151 | 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:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | 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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | 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:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | 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 `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:111:38 [INFO] [stdout] | [INFO] [stdout] 111 | 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:113:36 [INFO] [stdout] | [INFO] [stdout] 113 | 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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:113:43 [INFO] [stdout] | [INFO] [stdout] 113 | 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:115:16 [INFO] [stdout] | [INFO] [stdout] 115 | 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:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | _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:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | 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:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | _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:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | 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:144:36 [INFO] [stdout] | [INFO] [stdout] 144 | 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:154:33 [INFO] [stdout] | [INFO] [stdout] 154 | 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:161:38 [INFO] [stdout] | [INFO] [stdout] 161 | _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:162:38 [INFO] [stdout] | [INFO] [stdout] 162 | _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:167:38 [INFO] [stdout] | [INFO] [stdout] 167 | _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:168:38 [INFO] [stdout] | [INFO] [stdout] 168 | _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:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | / graph_edge.minlen = [INFO] [stdout] 176 | | 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:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | 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:176:63 [INFO] [stdout] | [INFO] [stdout] 176 | 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:179:32 [INFO] [stdout] | [INFO] [stdout] 179 | 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:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | 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] 194 - return total_weights; [INFO] [stdout] 194 + total_weights [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/acyclic.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 77 | 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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:208:16 [INFO] [stdout] | [INFO] [stdout] 208 | 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: 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: length comparison to zero [INFO] [stdout] --> src/layout/add_border_segments.rs:16:12 [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] = note: `#[warn(clippy::len_zero)]` on by 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: 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/add_border_segments.rs:25:28 [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:28 [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:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | 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:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | 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] = note: `#[warn(clippy::field_reassign_with_default)]` 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: 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/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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/add_border_segments.rs:48:23 [INFO] [stdout] | [INFO] [stdout] 48 | 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: 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/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 `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 `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: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/layout/add_border_segments.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / match prop { [INFO] [stdout] 56 | | BorderTypeName::BorderRight => { [INFO] [stdout] 57 | | border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [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] 55 ~ if prop == BorderTypeName::BorderRight { [INFO] [stdout] 56 + border = sg_node.border_right.as_mut().unwrap(); [INFO] [stdout] 57 + } [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:61:19 [INFO] [stdout] | [INFO] [stdout] 61 | 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:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | 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:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | 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 `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/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 `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: 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] = note: `#[warn(clippy::needless_borrow)]` on by default [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: 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: 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: 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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:8:9 [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] = note: `#[warn(clippy::ptr_arg)]` on by default [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:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | 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/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: 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: 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 `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: implicitly performing saturating subtraction [INFO] [stdout] --> src/layout/nesting_graph.rs:39:5 [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: 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: unneeded `return` statement [INFO] [stdout] --> src/layout/nesting_graph.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | 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] 95 - return depths; [INFO] [stdout] 95 + depths [INFO] [stdout] | [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: called `unwrap` on `border_bottom` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/nesting_graph.rs:151:28 [INFO] [stdout] | [INFO] [stdout] 150 | if border_bottom.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = border_bottom` [INFO] [stdout] 151 | 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:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | 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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/nesting_graph.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | 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:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | 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 `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:111:38 [INFO] [stdout] | [INFO] [stdout] 111 | 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:113:36 [INFO] [stdout] | [INFO] [stdout] 113 | 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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/nesting_graph.rs:113:43 [INFO] [stdout] | [INFO] [stdout] 113 | 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:115:16 [INFO] [stdout] | [INFO] [stdout] 115 | 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:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | _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:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | 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:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | _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:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | 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: 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 `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/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: 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: unneeded `return` statement [INFO] [stdout] --> src/layout/order/cross_count.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | 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] 33 - return cc; [INFO] [stdout] 33 + 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:38:15 [INFO] [stdout] | [INFO] [stdout] 38 | 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] 38 - layering: &mut Vec>, [INFO] [stdout] 38 + 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:46:36 [INFO] [stdout] | [INFO] [stdout] 46 | 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:53:14 [INFO] [stdout] | [INFO] [stdout] 53 | .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: consider using `sort_by_key` [INFO] [stdout] --> src/layout/order/cross_count.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | out_edges.sort_by(|e1, e2| e1.0.cmp(&e2.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 - out_edges.sort_by(|e1, e2| e1.0.cmp(&e2.0)); [INFO] [stdout] 68 + out_edges.sort_by_key(|e1| e1.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:144:36 [INFO] [stdout] | [INFO] [stdout] 144 | 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:154:33 [INFO] [stdout] | [INFO] [stdout] 154 | 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:161:38 [INFO] [stdout] | [INFO] [stdout] 161 | _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:162:38 [INFO] [stdout] | [INFO] [stdout] 162 | _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:167:38 [INFO] [stdout] | [INFO] [stdout] 167 | _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:168:38 [INFO] [stdout] | [INFO] [stdout] 168 | _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:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | / graph_edge.minlen = [INFO] [stdout] 176 | | 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:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | 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 `return` statement [INFO] [stdout] --> src/layout/order/init_order.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | 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] 67 - return layers; [INFO] [stdout] 67 + layers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/init_order.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | .filter(|v| 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:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | .map(|v| 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: unneeded `()` [INFO] [stdout] --> src/layout/order/init_order.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | 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/order/init_order.rs:44:23 [INFO] [stdout] | [INFO] [stdout] 44 | 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/nesting_graph.rs:176:63 [INFO] [stdout] | [INFO] [stdout] 176 | 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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:45:27 [INFO] [stdout] | [INFO] [stdout] 45 | 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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:47:54 [INFO] [stdout] | [INFO] [stdout] 47 | 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:57:23 [INFO] [stdout] | [INFO] [stdout] 57 | 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:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | 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/nesting_graph.rs:179:32 [INFO] [stdout] | [INFO] [stdout] 179 | 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:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | 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] 194 - return total_weights; [INFO] [stdout] 194 + total_weights [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/nesting_graph.rs:208:16 [INFO] [stdout] | [INFO] [stdout] 208 | 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/order/resolve_conflicts.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | 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] 85 - return do_resolve_conflicts(&mut source_set); [INFO] [stdout] 85 + 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:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | entries: &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] 44 - entries: &Vec, [INFO] [stdout] 44 + entries: &[Barycenter], [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:60:39 [INFO] [stdout] | [INFO] [stdout] 60 | 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: 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:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | 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: 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: 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: 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: unneeded `return` statement [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | / return entries [INFO] [stdout] 148 | | .into_iter() [INFO] [stdout] 149 | | .filter(|entry| !entry.merged.clone().unwrap_or(false)) [INFO] [stdout] 150 | | .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] 147 ~ entries [INFO] [stdout] 148 + .into_iter() [INFO] [stdout] 149 + .filter(|entry| !entry.merged.clone().unwrap_or(false)) [INFO] [stdout] 150 ~ .collect() [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/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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | 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: 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/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: unneeded `()` [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:104:20 [INFO] [stdout] | [INFO] [stdout] 104 | 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 `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/order/resolve_conflicts.rs:109:16 [INFO] [stdout] | [INFO] [stdout] 109 | || u_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:110:20 [INFO] [stdout] | [INFO] [stdout] 110 | >= 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: 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 `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: length comparison to zero [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:131:11 [INFO] [stdout] | [INFO] [stdout] 131 | 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/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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:149:26 [INFO] [stdout] | [INFO] [stdout] 149 | .filter(|entry| !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:163:29 [INFO] [stdout] | [INFO] [stdout] 163 | 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:164:33 [INFO] [stdout] | [INFO] [stdout] 164 | 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: 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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:171:29 [INFO] [stdout] | [INFO] [stdout] 171 | 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:172:33 [INFO] [stdout] | [INFO] [stdout] 172 | 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/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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:184:30 [INFO] [stdout] | [INFO] [stdout] 184 | 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 `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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:184:49 [INFO] [stdout] | [INFO] [stdout] 184 | 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 `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: 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: 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: 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/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 `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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:8:9 [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] = note: `#[warn(clippy::ptr_arg)]` on by default [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 `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: unneeded `()` [INFO] [stdout] --> src/layout/order/add_subgraph_constraints.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | 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: 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: 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: 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: 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: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:24:9 [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: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:29:9 [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:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | 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] 80 - return result; [INFO] [stdout] 80 + result [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:9 [INFO] [stdout] | [INFO] [stdout] 36 | / movable = movable [INFO] [stdout] 37 | | .into_iter() [INFO] [stdout] 38 | | .filter(|w| w != &bl.clone().unwrap() && w != &br.clone().unwrap()) [INFO] [stdout] 39 | | .collect(); [INFO] [stdout] | |______________________^ help: consider calling `.retain()` instead: `movable.retain(|w| w != &bl.clone().unwrap() && w != &br.clone().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 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: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | 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: 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: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | 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: 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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:72:33 [INFO] [stdout] | [INFO] [stdout] 72 | 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:73:33 [INFO] [stdout] | [INFO] [stdout] 73 | 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: 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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:84:14 [INFO] [stdout] | [INFO] [stdout] 84 | entries: &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] 84 - entries: &mut Vec, [INFO] [stdout] 84 + entries: &mut [ResolvedBaryEntry], [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/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: 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: unneeded `()` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:95:24 [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/sort_subgraph.rs:105:29 [INFO] [stdout] | [INFO] [stdout] 105 | 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/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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:107:29 [INFO] [stdout] | [INFO] [stdout] 107 | 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:113:46 [INFO] [stdout] | [INFO] [stdout] 113 | 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:115:34 [INFO] [stdout] | [INFO] [stdout] 115 | 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:116:30 [INFO] [stdout] | [INFO] [stdout] 116 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/order/cross_count.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | 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] 33 - return cc; [INFO] [stdout] 33 + 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:38:15 [INFO] [stdout] | [INFO] [stdout] 38 | 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] 38 - layering: &mut Vec>, [INFO] [stdout] 38 + layering: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/mod.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / return ranks [INFO] [stdout] 83 | | .iter() [INFO] [stdout] 84 | | .map(|rank| build_layer_graph(g, rank, relationship)) [INFO] [stdout] 85 | | .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] 82 ~ ranks [INFO] [stdout] 83 + .iter() [INFO] [stdout] 84 + .map(|rank| build_layer_graph(g, rank, relationship)) [INFO] [stdout] 85 ~ .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:79:12 [INFO] [stdout] | [INFO] [stdout] 79 | ranks: &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] 79 - ranks: &Vec, [INFO] [stdout] 79 + ranks: &[i32], [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:46:36 [INFO] [stdout] | [INFO] [stdout] 46 | 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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:89:19 [INFO] [stdout] | [INFO] [stdout] 89 | layer_graphs: &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] 89 - layer_graphs: &mut Vec>, [INFO] [stdout] 89 + layer_graphs: &mut [Graph], [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:53:14 [INFO] [stdout] | [INFO] [stdout] 53 | .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: consider using `sort_by_key` [INFO] [stdout] --> src/layout/order/cross_count.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | out_edges.sort_by(|e1, e2| e1.0.cmp(&e2.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 - out_edges.sort_by(|e1, e2| e1.0.cmp(&e2.0)); [INFO] [stdout] 68 + out_edges.sort_by_key(|e1| e1.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:21:12 [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: unneeded `return` statement [INFO] [stdout] --> src/layout/order/init_order.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | 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] 67 - return layers; [INFO] [stdout] 67 + layers [INFO] [stdout] | [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:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | && g.node(path_v) [INFO] [stdout] | ________________________^ [INFO] [stdout] 34 | | .unwrap_or(&empty_node) [INFO] [stdout] 35 | | .max_rank [INFO] [stdout] 36 | | .clone() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 33 ~ && g.node(path_v) [INFO] [stdout] 34 + .unwrap_or(&empty_node) [INFO] [stdout] 35 + .max_rank [INFO] [stdout] | [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:38:27 [INFO] [stdout] | [INFO] [stdout] 38 | < 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: length comparison to zero [INFO] [stdout] --> src/layout/order/init_order.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | .filter(|v| 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:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | .map(|v| 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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:56:24 [INFO] [stdout] | [INFO] [stdout] 56 | && g.node(path_v).unwrap().min_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:57:28 [INFO] [stdout] | [INFO] [stdout] 57 | <= 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: unneeded `()` [INFO] [stdout] --> src/layout/order/init_order.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | 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: accessing first element with `g [INFO] [stdout] .successors(&v) [INFO] [stdout] .unwrap_or(vec![]).get(0)` [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | v = g [INFO] [stdout] | _________________^ [INFO] [stdout] 66 | | .successors(&v) [INFO] [stdout] 67 | | .unwrap_or(vec![]) [INFO] [stdout] 68 | | .get(0) [INFO] [stdout] | |_______________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 65 ~ v = g [INFO] [stdout] 66 + .successors(&v) [INFO] [stdout] 67 + .unwrap_or(vec![]).first() [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:44:23 [INFO] [stdout] | [INFO] [stdout] 44 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | 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] 115 - return (v_path, lca.clone()); [INFO] [stdout] 115 + (v_path, lca.clone()) [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:45:27 [INFO] [stdout] | [INFO] [stdout] 45 | 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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/init_order.rs:47:54 [INFO] [stdout] | [INFO] [stdout] 47 | 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:57:23 [INFO] [stdout] | [INFO] [stdout] 57 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | 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] 140 - return result; [INFO] [stdout] 140 + result [INFO] [stdout] | [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:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | 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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:128:19 [INFO] [stdout] | [INFO] [stdout] 128 | 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:129:20 [INFO] [stdout] | [INFO] [stdout] 129 | 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:132:40 [INFO] [stdout] | [INFO] [stdout] 132 | 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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | 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] 32 - layering: &Vec>, [INFO] [stdout] 32 + layering: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | 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] 85 - return do_resolve_conflicts(&mut source_set); [INFO] [stdout] 85 + 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/position/bk.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | prev_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] 38 - prev_layer: &Vec, [INFO] [stdout] 38 + prev_layer: &[String], [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:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | 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] 39 - layer: &Vec, [INFO] [stdout] 39 + layer: &[String], [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:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | entries: &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] 44 - entries: &Vec, [INFO] [stdout] 44 + entries: &[Barycenter], [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:60:39 [INFO] [stdout] | [INFO] [stdout] 60 | 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:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | 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:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | / return entries [INFO] [stdout] 148 | | .into_iter() [INFO] [stdout] 149 | | .filter(|entry| !entry.merged.clone().unwrap_or(false)) [INFO] [stdout] 150 | | .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] 147 ~ entries [INFO] [stdout] 148 + .into_iter() [INFO] [stdout] 149 + .filter(|entry| !entry.merged.clone().unwrap_or(false)) [INFO] [stdout] 150 ~ .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:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | 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:104:20 [INFO] [stdout] | [INFO] [stdout] 104 | 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:109:16 [INFO] [stdout] | [INFO] [stdout] 109 | || u_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:110:20 [INFO] [stdout] | [INFO] [stdout] 110 | >= 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:79:24 [INFO] [stdout] | [INFO] [stdout] 79 | 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:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | 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] 89 - layering: &Vec>, [INFO] [stdout] 89 + 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:95:16 [INFO] [stdout] | [INFO] [stdout] 95 | south: &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] 95 - south: &Vec, [INFO] [stdout] 95 + south: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:131:11 [INFO] [stdout] | [INFO] [stdout] 131 | 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:102:18 [INFO] [stdout] | [INFO] [stdout] 102 | 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/order/resolve_conflicts.rs:149:26 [INFO] [stdout] | [INFO] [stdout] 149 | .filter(|entry| !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:163:29 [INFO] [stdout] | [INFO] [stdout] 163 | 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:102:37 [INFO] [stdout] | [INFO] [stdout] 102 | 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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:164:33 [INFO] [stdout] | [INFO] [stdout] 164 | 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/position/bk.rs:109:44 [INFO] [stdout] | [INFO] [stdout] 109 | 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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:171:29 [INFO] [stdout] | [INFO] [stdout] 171 | 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:172:33 [INFO] [stdout] | [INFO] [stdout] 172 | 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/resolve_conflicts.rs:184:30 [INFO] [stdout] | [INFO] [stdout] 184 | 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:184:49 [INFO] [stdout] | [INFO] [stdout] 184 | 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: called `unwrap` on `predecessors_` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:139:44 [INFO] [stdout] | [INFO] [stdout] 138 | if predecessors_.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = predecessors_` [INFO] [stdout] 139 | 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:124:16 [INFO] [stdout] | [INFO] [stdout] 124 | north: &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] 124 - north: &Vec, [INFO] [stdout] 124 + north: &[String], [INFO] [stdout] | [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: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:140:28 [INFO] [stdout] | [INFO] [stdout] 140 | 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/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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:142:33 [INFO] [stdout] | [INFO] [stdout] 142 | ... 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:145:33 [INFO] [stdout] | [INFO] [stdout] 145 | ... &south, [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 `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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | ... 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: 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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | v_: &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] 199 ~ v_: &str, [INFO] [stdout] 200 | w_: &String, [INFO] [stdout] 201 | ) { [INFO] [stdout] 202 ~ let mut v = v_.to_owned(); [INFO] [stdout] | [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:200:9 [INFO] [stdout] | [INFO] [stdout] 200 | 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] 200 ~ w_: &str, [INFO] [stdout] 201 | ) { [INFO] [stdout] 202 | let mut v = v_.clone(); [INFO] [stdout] 203 ~ let mut w = w_.to_owned(); [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: this looks like you are swapping `v` and `w` manually [INFO] [stdout] --> src/layout/position/bk.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | / let tmp = v; [INFO] [stdout] 206 | | v = w; [INFO] [stdout] 207 | | 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:227:9 [INFO] [stdout] | [INFO] [stdout] 227 | / let tmp = v; [INFO] [stdout] 228 | | v = w; [INFO] [stdout] 229 | | 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: 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:249:18 [INFO] [stdout] | [INFO] [stdout] 249 | 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: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:24:9 [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: called `unwrap` on `node` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:29:9 [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:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | 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] 80 - return result; [INFO] [stdout] 80 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:295:5 [INFO] [stdout] | [INFO] [stdout] 295 | 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] 295 - return (root, align.into_values()); [INFO] [stdout] 295 + (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:247:15 [INFO] [stdout] | [INFO] [stdout] 247 | 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] 247 - layering: &Vec>, [INFO] [stdout] 247 + layering: &[Vec], [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:9 [INFO] [stdout] | [INFO] [stdout] 36 | / movable = movable [INFO] [stdout] 37 | | .into_iter() [INFO] [stdout] 38 | | .filter(|w| w != &bl.clone().unwrap() && w != &br.clone().unwrap()) [INFO] [stdout] 39 | | .collect(); [INFO] [stdout] | |______________________^ help: consider calling `.retain()` instead: `movable.retain(|w| w != &bl.clone().unwrap() && w != &br.clone().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | 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/position/bk.rs:270:16 [INFO] [stdout] | [INFO] [stdout] 270 | 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: length comparison to zero [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:286:36 [INFO] [stdout] | [INFO] [stdout] 286 | 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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:72:33 [INFO] [stdout] | [INFO] [stdout] 72 | 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:73:33 [INFO] [stdout] | [INFO] [stdout] 73 | 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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:302:12 [INFO] [stdout] | [INFO] [stdout] 302 | 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] 302 - align: &Vec, [INFO] [stdout] 302 + 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:320:22 [INFO] [stdout] | [INFO] [stdout] 320 | set_xs_func: fn( [INFO] [stdout] | ______________________^ [INFO] [stdout] 321 | | &String, [INFO] [stdout] 322 | | &mut OrderedHashMap, [INFO] [stdout] 323 | | &Graph, [INFO] [stdout] 324 | | &Graph, [INFO] [stdout] 325 | | &BorderTypeName, [INFO] [stdout] 326 | | ), [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:327:26 [INFO] [stdout] | [INFO] [stdout] 327 | 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:361:42 [INFO] [stdout] | [INFO] [stdout] 361 | + (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:378:42 [INFO] [stdout] | [INFO] [stdout] 378 | - (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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:84:14 [INFO] [stdout] | [INFO] [stdout] 84 | entries: &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] 84 - entries: &mut Vec, [INFO] [stdout] 84 + entries: &mut [ResolvedBaryEntry], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `()` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:95:24 [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/sort_subgraph.rs:105:29 [INFO] [stdout] | [INFO] [stdout] 105 | 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:107:29 [INFO] [stdout] | [INFO] [stdout] 107 | 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:113:46 [INFO] [stdout] | [INFO] [stdout] 113 | 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:115:34 [INFO] [stdout] | [INFO] [stdout] 115 | 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:116:30 [INFO] [stdout] | [INFO] [stdout] 116 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:412:46 [INFO] [stdout] | [INFO] [stdout] 412 | 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:420:15 [INFO] [stdout] | [INFO] [stdout] 420 | 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] 420 - layering: &Vec>, [INFO] [stdout] 420 + layering: &[Vec], [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:426:17 [INFO] [stdout] | [INFO] [stdout] 426 | let sep_fn: 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: called `unwrap` on `u` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:439:26 [INFO] [stdout] | [INFO] [stdout] 438 | if u.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = &u` [INFO] [stdout] 439 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/order/mod.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | / return ranks [INFO] [stdout] 83 | | .iter() [INFO] [stdout] 84 | | .map(|rank| build_layer_graph(g, rank, relationship)) [INFO] [stdout] 85 | | .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] 82 ~ ranks [INFO] [stdout] 83 + .iter() [INFO] [stdout] 84 + .map(|rank| build_layer_graph(g, rank, relationship)) [INFO] [stdout] 85 ~ .collect() [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:442:27 [INFO] [stdout] | [INFO] [stdout] 442 | .edge(&u_root, &v_root, None) [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:79:12 [INFO] [stdout] | [INFO] [stdout] 79 | ranks: &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] 79 - ranks: &Vec, [INFO] [stdout] 79 + ranks: &[i32], [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:442:36 [INFO] [stdout] | [INFO] [stdout] 442 | .edge(&u_root, &v_root, None) [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:447:21 [INFO] [stdout] | [INFO] [stdout] 447 | &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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/order/mod.rs:89:19 [INFO] [stdout] | [INFO] [stdout] 89 | layer_graphs: &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] 89 - layer_graphs: &mut Vec>, [INFO] [stdout] 89 + layer_graphs: &mut [Graph], [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:448:21 [INFO] [stdout] | [INFO] [stdout] 448 | &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:449:26 [INFO] [stdout] | [INFO] [stdout] 449 | 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] = note: `#[warn(clippy::unnecessary_cast)]` 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:508:24 [INFO] [stdout] | [INFO] [stdout] 508 | let align_to_min = align_to_vals [INFO] [stdout] | ________________________^ [INFO] [stdout] 509 | | .iter() [INFO] [stdout] 510 | | .min_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 511 | | .unwrap() [INFO] [stdout] 512 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 508 ~ let align_to_min = *align_to_vals [INFO] [stdout] 509 + .iter() [INFO] [stdout] 510 + .min_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 511 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:513:24 [INFO] [stdout] | [INFO] [stdout] 513 | let align_to_max = align_to_vals [INFO] [stdout] | ________________________^ [INFO] [stdout] 514 | | .iter() [INFO] [stdout] 515 | | .max_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 516 | | .unwrap() [INFO] [stdout] 517 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 513 ~ let align_to_max = *align_to_vals [INFO] [stdout] 514 + .iter() [INFO] [stdout] 515 + .max_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 516 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:21:12 [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:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | && g.node(path_v) [INFO] [stdout] | ________________________^ [INFO] [stdout] 34 | | .unwrap_or(&empty_node) [INFO] [stdout] 35 | | .max_rank [INFO] [stdout] 36 | | .clone() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 33 ~ && g.node(path_v) [INFO] [stdout] 34 + .unwrap_or(&empty_node) [INFO] [stdout] 35 + .max_rank [INFO] [stdout] | [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:38:27 [INFO] [stdout] | [INFO] [stdout] 38 | < 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:56:24 [INFO] [stdout] | [INFO] [stdout] 56 | && g.node(path_v).unwrap().min_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:57:28 [INFO] [stdout] | [INFO] [stdout] 57 | <= 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: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:655:5 [INFO] [stdout] | [INFO] [stdout] 655 | 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] 655 - return balance(&xss, g.graph().align.clone()); [INFO] [stdout] 655 + 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:613:30 [INFO] [stdout] | [INFO] [stdout] 613 | let neighbor_fn: Box< [INFO] [stdout] | ______________________________^ [INFO] [stdout] 614 | | dyn Fn(&Graph, &String) -> Vec, [INFO] [stdout] 615 | | > = 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: accessing first element with `g [INFO] [stdout] .successors(&v) [INFO] [stdout] .unwrap_or(vec![]).get(0)` [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | v = g [INFO] [stdout] | _________________^ [INFO] [stdout] 66 | | .successors(&v) [INFO] [stdout] 67 | | .unwrap_or(vec![]) [INFO] [stdout] 68 | | .get(0) [INFO] [stdout] | |_______________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 65 ~ v = g [INFO] [stdout] 66 + .successors(&v) [INFO] [stdout] 67 + .unwrap_or(vec![]).first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | 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] 115 - return (v_path, lca.clone()); [INFO] [stdout] 115 + (v_path, lca.clone()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:644:44 [INFO] [stdout] | [INFO] [stdout] 644 | 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:649:24 [INFO] [stdout] | [INFO] [stdout] 649 | 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:662:6 [INFO] [stdout] | [INFO] [stdout] 662 | ) -> 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:663:21 [INFO] [stdout] | [INFO] [stdout] 663 | 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:664:21 [INFO] [stdout] | [INFO] [stdout] 664 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | 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] 140 - return result; [INFO] [stdout] 140 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:665:24 [INFO] [stdout] | [INFO] [stdout] 665 | 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 `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/parent_dummy_chains.rs:128:19 [INFO] [stdout] | [INFO] [stdout] 128 | 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:129:20 [INFO] [stdout] | [INFO] [stdout] 129 | 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:132:40 [INFO] [stdout] | [INFO] [stdout] 132 | 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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | 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] 32 - layering: &Vec>, [INFO] [stdout] 32 + 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:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | prev_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] 38 - prev_layer: &Vec, [INFO] [stdout] 38 + prev_layer: &[String], [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:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | 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] 39 - layer: &Vec, [INFO] [stdout] 39 + layer: &[String], [INFO] [stdout] | [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:79:24 [INFO] [stdout] | [INFO] [stdout] 79 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | 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] 66 - return rank; [INFO] [stdout] 66 + rank [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:89:15 [INFO] [stdout] | [INFO] [stdout] 89 | 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] 89 - layering: &Vec>, [INFO] [stdout] 89 + layering: &[Vec], [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:51:40 [INFO] [stdout] | [INFO] [stdout] 51 | - (g.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:95:16 [INFO] [stdout] | [INFO] [stdout] 95 | south: &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] 95 - south: &Vec, [INFO] [stdout] 95 + south: &[String], [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:59:25 [INFO] [stdout] | [INFO] [stdout] 59 | 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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/util.rs:63:40 [INFO] [stdout] | [INFO] [stdout] 63 | 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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:102:18 [INFO] [stdout] | [INFO] [stdout] 102 | 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:102:37 [INFO] [stdout] | [INFO] [stdout] 102 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | 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] 98 - return w_rank - v_rank - minlen; [INFO] [stdout] 98 + w_rank - v_rank - minlen [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:109:44 [INFO] [stdout] | [INFO] [stdout] 109 | 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: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | 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: called `unwrap` on `predecessors_` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:139:44 [INFO] [stdout] | [INFO] [stdout] 138 | if predecessors_.is_some() { [INFO] [stdout] | -------------------------- help: try: `if let Some() = predecessors_` [INFO] [stdout] 139 | 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:124:16 [INFO] [stdout] | [INFO] [stdout] 124 | north: &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] 124 - north: &Vec, [INFO] [stdout] 124 + north: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | 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] 97 - return t.node_count(); [INFO] [stdout] 97 + t.node_count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:140:28 [INFO] [stdout] | [INFO] [stdout] 140 | 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:142:33 [INFO] [stdout] | [INFO] [stdout] 142 | ... 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/rank/feasible_tree.rs:87:36 [INFO] [stdout] | [INFO] [stdout] 87 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:145:33 [INFO] [stdout] | [INFO] [stdout] 145 | ... &south, [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: called `unwrap` on `result` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:124:14 [INFO] [stdout] | [INFO] [stdout] 123 | if result.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = result` [INFO] [stdout] 124 | 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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | ... 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: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | 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] 120 - return e1_.unwrap().cmp(&e2_.unwrap()); [INFO] [stdout] 120 + e1_.unwrap().cmp(&e2_.unwrap()) [INFO] [stdout] | [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:72:60 [INFO] [stdout] | [INFO] [stdout] 71 | if f.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = f` [INFO] [stdout] 72 | 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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | v_: &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] 199 ~ v_: &str, [INFO] [stdout] 200 | w_: &String, [INFO] [stdout] 201 | ) { [INFO] [stdout] 202 ~ 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:200:9 [INFO] [stdout] | [INFO] [stdout] 200 | 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] 200 ~ w_: &str, [INFO] [stdout] 201 | ) { [INFO] [stdout] 202 | let mut v = v_.clone(); [INFO] [stdout] 203 ~ 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:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | / let tmp = v; [INFO] [stdout] 206 | | v = w; [INFO] [stdout] 207 | | 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | 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 looks like you are swapping `v` and `w` manually [INFO] [stdout] --> src/layout/position/bk.rs:227:9 [INFO] [stdout] | [INFO] [stdout] 227 | / let tmp = v; [INFO] [stdout] 228 | | v = w; [INFO] [stdout] 229 | | 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:249:18 [INFO] [stdout] | [INFO] [stdout] 249 | 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:295:5 [INFO] [stdout] | [INFO] [stdout] 295 | 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] 295 - return (root, align.into_values()); [INFO] [stdout] 295 + (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:247:15 [INFO] [stdout] | [INFO] [stdout] 247 | 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] 247 - layering: &Vec>, [INFO] [stdout] 247 + layering: &[Vec], [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:118:38 [INFO] [stdout] | [INFO] [stdout] 118 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:146:46 [INFO] [stdout] | [INFO] [stdout] 146 | 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: length comparison to zero [INFO] [stdout] --> src/layout/position/bk.rs:270:16 [INFO] [stdout] | [INFO] [stdout] 270 | 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:286:36 [INFO] [stdout] | [INFO] [stdout] 286 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:180:35 [INFO] [stdout] | [INFO] [stdout] 180 | ... .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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/layout/position/bk.rs:302:12 [INFO] [stdout] | [INFO] [stdout] 302 | 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] 302 - align: &Vec, [INFO] [stdout] 302 + align: &[String], [INFO] [stdout] | [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:201:16 [INFO] [stdout] | [INFO] [stdout] 200 | if root_.is_some() { [INFO] [stdout] | ------------------ help: try: `if let Some() = root_` [INFO] [stdout] 201 | 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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/layout/position/bk.rs:320:22 [INFO] [stdout] | [INFO] [stdout] 320 | set_xs_func: fn( [INFO] [stdout] | ______________________^ [INFO] [stdout] 321 | | &String, [INFO] [stdout] 322 | | &mut OrderedHashMap, [INFO] [stdout] 323 | | &Graph, [INFO] [stdout] 324 | | &Graph, [INFO] [stdout] 325 | | &BorderTypeName, [INFO] [stdout] 326 | | ), [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:327:26 [INFO] [stdout] | [INFO] [stdout] 327 | 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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:214:15 [INFO] [stdout] | [INFO] [stdout] 214 | 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:215:24 [INFO] [stdout] | [INFO] [stdout] 215 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:361:42 [INFO] [stdout] | [INFO] [stdout] 361 | + (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:378:42 [INFO] [stdout] | [INFO] [stdout] 378 | - (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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:222:62 [INFO] [stdout] | [INFO] [stdout] 222 | 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:230:26 [INFO] [stdout] | [INFO] [stdout] 230 | 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:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | 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:281:43 [INFO] [stdout] | [INFO] [stdout] 281 | 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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/position/bk.rs:412:46 [INFO] [stdout] | [INFO] [stdout] 412 | 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:420:15 [INFO] [stdout] | [INFO] [stdout] 420 | 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] 420 - layering: &Vec>, [INFO] [stdout] 420 + layering: &[Vec], [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:426:17 [INFO] [stdout] | [INFO] [stdout] 426 | let sep_fn: 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: called `unwrap` on `u` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/position/bk.rs:439:26 [INFO] [stdout] | [INFO] [stdout] 438 | if u.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = &u` [INFO] [stdout] 439 | 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:442:27 [INFO] [stdout] | [INFO] [stdout] 442 | .edge(&u_root, &v_root, None) [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:442:36 [INFO] [stdout] | [INFO] [stdout] 442 | .edge(&u_root, &v_root, None) [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 boolean expression can be simplified [INFO] [stdout] --> src/layout/rank/network_simplex.rs:334:19 [INFO] [stdout] | [INFO] [stdout] 334 | .find(|v| !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/position/bk.rs:447:21 [INFO] [stdout] | [INFO] [stdout] 447 | &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:448:21 [INFO] [stdout] | [INFO] [stdout] 448 | &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:449:26 [INFO] [stdout] | [INFO] [stdout] 449 | 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] = note: `#[warn(clippy::unnecessary_cast)]` 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:370:19 [INFO] [stdout] | [INFO] [stdout] 370 | 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:370:23 [INFO] [stdout] | [INFO] [stdout] 370 | 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:378:20 [INFO] [stdout] | [INFO] [stdout] 378 | let root_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:379:20 [INFO] [stdout] | [INFO] [stdout] 379 | 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/rank/network_simplex.rs:380:17 [INFO] [stdout] | [INFO] [stdout] 380 | let v_low = v_label.low.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_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:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | 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 `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:508:24 [INFO] [stdout] | [INFO] [stdout] 508 | let align_to_min = align_to_vals [INFO] [stdout] | ________________________^ [INFO] [stdout] 509 | | .iter() [INFO] [stdout] 510 | | .min_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 511 | | .unwrap() [INFO] [stdout] 512 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 508 ~ let align_to_min = *align_to_vals [INFO] [stdout] 509 + .iter() [INFO] [stdout] 510 + .min_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 511 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:513:24 [INFO] [stdout] | [INFO] [stdout] 513 | let align_to_max = align_to_vals [INFO] [stdout] | ________________________^ [INFO] [stdout] 514 | | .iter() [INFO] [stdout] 515 | | .max_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 516 | | .unwrap() [INFO] [stdout] 517 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 513 ~ let align_to_max = *align_to_vals [INFO] [stdout] 514 + .iter() [INFO] [stdout] 515 + .max_by(|a, b| a.partial_cmp(b).unwrap()) [INFO] [stdout] 516 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:11:9 [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:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | 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] 34 - return node_id; [INFO] [stdout] 34 + node_id [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/position/bk.rs:655:5 [INFO] [stdout] | [INFO] [stdout] 655 | 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] 655 - return balance(&xss, g.graph().align.clone()); [INFO] [stdout] 655 + 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:613:30 [INFO] [stdout] | [INFO] [stdout] 613 | let neighbor_fn: Box< [INFO] [stdout] | ______________________________^ [INFO] [stdout] 614 | | dyn Fn(&Graph, &String) -> Vec, [INFO] [stdout] 615 | | > = 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: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | 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] 122 - return simplified; [INFO] [stdout] 122 + simplified [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | 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:131:12 [INFO] [stdout] | [INFO] [stdout] 131 | 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: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/position/bk.rs:644:44 [INFO] [stdout] | [INFO] [stdout] 644 | 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:649:24 [INFO] [stdout] | [INFO] [stdout] 649 | 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:662:6 [INFO] [stdout] | [INFO] [stdout] 662 | ) -> 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:663:21 [INFO] [stdout] | [INFO] [stdout] 663 | 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:664:21 [INFO] [stdout] | [INFO] [stdout] 664 | 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:665:24 [INFO] [stdout] | [INFO] [stdout] 665 | 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 `return` statement [INFO] [stdout] --> src/layout/util.rs:208:5 [INFO] [stdout] | [INFO] [stdout] 208 | / return layering [INFO] [stdout] 209 | | .into_iter() [INFO] [stdout] 210 | | .map(|layer| -> Vec { [INFO] [stdout] 211 | | let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 216 | | }) [INFO] [stdout] 217 | | .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] 208 ~ layering [INFO] [stdout] 209 + .into_iter() [INFO] [stdout] 210 + .map(|layer| -> Vec { [INFO] [stdout] 211 + let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] 212 + keys.sort(); [INFO] [stdout] 213 + keys.iter() [INFO] [stdout] 214 + .map(|key| -> String { layer.get(key).cloned().unwrap() }) [INFO] [stdout] 215 + .collect() [INFO] [stdout] 216 + }) [INFO] [stdout] 217 ~ .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:229:13 [INFO] [stdout] | [INFO] [stdout] 229 | / graph [INFO] [stdout] 230 | | .node(v) [INFO] [stdout] 231 | | .unwrap_or(&GraphNode::default()) [INFO] [stdout] 232 | | .rank [INFO] [stdout] 233 | | .clone() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 229 ~ graph [INFO] [stdout] 230 + .node(v) [INFO] [stdout] 231 + .unwrap_or(&GraphNode::default()) [INFO] [stdout] 232 + .rank [INFO] [stdout] | [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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:266:20 [INFO] [stdout] | [INFO] [stdout] 266 | let rank = graph [INFO] [stdout] | ____________________^ [INFO] [stdout] 267 | | .node(v) [INFO] [stdout] 268 | | .unwrap_or(&GraphNode::default()) [INFO] [stdout] 269 | | .rank [INFO] [stdout] 270 | | .clone() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 266 ~ let rank = graph [INFO] [stdout] 267 + .node(v) [INFO] [stdout] 268 + .unwrap_or(&GraphNode::default()) [INFO] [stdout] 269 + .rank [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:273:22 [INFO] [stdout] | [INFO] [stdout] 273 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/util.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | 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] 66 - return rank; [INFO] [stdout] 66 + rank [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:277:28 [INFO] [stdout] | [INFO] [stdout] 277 | 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:279:12 [INFO] [stdout] | [INFO] [stdout] 279 | 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:279:29 [INFO] [stdout] | [INFO] [stdout] 279 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/util.rs:51:40 [INFO] [stdout] | [INFO] [stdout] 51 | - (g.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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/layout/rank/util.rs:59:25 [INFO] [stdout] | [INFO] [stdout] 59 | 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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:285:63 [INFO] [stdout] | [INFO] [stdout] 285 | 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: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/util.rs:63:40 [INFO] [stdout] | [INFO] [stdout] 63 | 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:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | 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] 98 - return w_rank - v_rank - minlen; [INFO] [stdout] 98 + w_rank - v_rank - minlen [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:307:5 [INFO] [stdout] | [INFO] [stdout] 307 | return add_dummy_node(graph, "border".to_string(), node, prefix.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] 307 - return add_dummy_node(graph, "border".to_string(), node, prefix.to_string()); [INFO] [stdout] 307 + add_dummy_node(graph, "border".to_string(), node, prefix.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:313:18 [INFO] [stdout] | [INFO] [stdout] 313 | .map(|v| 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:345:5 [INFO] [stdout] | [INFO] [stdout] 345 | 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] 345 - return result; [INFO] [stdout] 345 + 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:329:17 [INFO] [stdout] | [INFO] [stdout] 329 | collection: &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] 329 - collection: &Vec, [INFO] [stdout] 329 + collection: &[V], [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:53:30 [INFO] [stdout] | [INFO] [stdout] 53 | 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:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | 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] 97 - return t.node_count(); [INFO] [stdout] 97 + 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:87:36 [INFO] [stdout] | [INFO] [stdout] 87 | 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: length comparison to zero [INFO] [stdout] --> src/layout/mod.rs:43:16 [INFO] [stdout] | [INFO] [stdout] 43 | 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: called `unwrap` on `result` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:124:14 [INFO] [stdout] | [INFO] [stdout] 123 | if result.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = result` [INFO] [stdout] 124 | 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/mod.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | 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] 153 - return g; [INFO] [stdout] 153 + g [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/rank/feasible_tree.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | 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] 120 - return e1_.unwrap().cmp(&e2_.unwrap()); [INFO] [stdout] 120 + e1_.unwrap().cmp(&e2_.unwrap()) [INFO] [stdout] | [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:72:60 [INFO] [stdout] | [INFO] [stdout] 71 | if f.is_some() { [INFO] [stdout] | -------------- help: try: `if let Some() = f` [INFO] [stdout] 72 | 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:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | 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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:207:16 [INFO] [stdout] | [INFO] [stdout] 207 | 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:207:59 [INFO] [stdout] | [INFO] [stdout] 207 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:118:38 [INFO] [stdout] | [INFO] [stdout] 118 | 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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/mod.rs:213:17 [INFO] [stdout] | [INFO] [stdout] 213 | 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:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | 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/rank/network_simplex.rs:146:46 [INFO] [stdout] | [INFO] [stdout] 146 | 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 `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | _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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:180:35 [INFO] [stdout] | [INFO] [stdout] 180 | ... .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:201:16 [INFO] [stdout] | [INFO] [stdout] 200 | if root_.is_some() { [INFO] [stdout] | ------------------ help: try: `if let Some() = root_` [INFO] [stdout] 201 | 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:214:15 [INFO] [stdout] | [INFO] [stdout] 214 | 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:215:24 [INFO] [stdout] | [INFO] [stdout] 215 | 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: called `unwrap` on `edge.points` after checking its variant with `is_some` [INFO] [stdout] --> src/layout/mod.rs:339:22 [INFO] [stdout] | [INFO] [stdout] 338 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 339 | 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/layout/rank/network_simplex.rs:222:62 [INFO] [stdout] | [INFO] [stdout] 222 | 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:230:26 [INFO] [stdout] | [INFO] [stdout] 230 | 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:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | 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:281:43 [INFO] [stdout] | [INFO] [stdout] 281 | 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:334:19 [INFO] [stdout] | [INFO] [stdout] 334 | .find(|v| !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: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/mod.rs:439:31 [INFO] [stdout] | [INFO] [stdout] 439 | 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:445:27 [INFO] [stdout] | [INFO] [stdout] 445 | 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:447:27 [INFO] [stdout] | [INFO] [stdout] 447 | 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:458:30 [INFO] [stdout] | [INFO] [stdout] 457 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 458 | 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:456:9 [INFO] [stdout] | [INFO] [stdout] 456 | / if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] 457 | | if edge.points.is_some() { [INFO] [stdout] 458 | | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 459 | | points.reverse(); [INFO] [stdout] 460 | | } [INFO] [stdout] 461 | | } [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] 456 ~ if edge.reversed.clone().unwrap_or(false) [INFO] [stdout] 457 ~ && edge.points.is_some() { [INFO] [stdout] 458 | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 459 | points.reverse(); [INFO] [stdout] 460 ~ } [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:456:12 [INFO] [stdout] | [INFO] [stdout] 456 | 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:467:12 [INFO] [stdout] | [INFO] [stdout] 467 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout/rank/network_simplex.rs:370:19 [INFO] [stdout] | [INFO] [stdout] 370 | 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:370:23 [INFO] [stdout] | [INFO] [stdout] 370 | 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:378:20 [INFO] [stdout] | [INFO] [stdout] 378 | let root_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:379:20 [INFO] [stdout] | [INFO] [stdout] 379 | 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/rank/network_simplex.rs:380:17 [INFO] [stdout] | [INFO] [stdout] 380 | let v_low = v_label.low.clone().unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_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:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | 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/mod.rs:526:24 [INFO] [stdout] | [INFO] [stdout] 526 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:11:9 [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/layout/mod.rs:531:17 [INFO] [stdout] | [INFO] [stdout] 531 | _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:530:17 [INFO] [stdout] | [INFO] [stdout] 530 | 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:531:37 [INFO] [stdout] | [INFO] [stdout] 531 | _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: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | 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] 34 - return node_id; [INFO] [stdout] 34 + node_id [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:532:38 [INFO] [stdout] | [INFO] [stdout] 532 | _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:533:36 [INFO] [stdout] | [INFO] [stdout] 533 | _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: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | 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] 122 - return simplified; [INFO] [stdout] 122 + simplified [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/layout/util.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | 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:131:12 [INFO] [stdout] | [INFO] [stdout] 131 | 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: manual implementation of `Option::map` [INFO] [stdout] --> src/ordered_hashmap/mod.rs:237:17 [INFO] [stdout] | [INFO] [stdout] 237 | / if let Some(index) = extracted_items.iter().position(|(key, _)| *key == k) { [INFO] [stdout] 238 | | Some(extracted_items.remove(index).1) [INFO] [stdout] 239 | | } else { [INFO] [stdout] 240 | | None [INFO] [stdout] 241 | | } [INFO] [stdout] | |_________________^ help: try: `extracted_items.iter().position(|(key, _)| *key == k).map(|index| extracted_items.remove(index).1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout/util.rs:208:5 [INFO] [stdout] | [INFO] [stdout] 208 | / return layering [INFO] [stdout] 209 | | .into_iter() [INFO] [stdout] 210 | | .map(|layer| -> Vec { [INFO] [stdout] 211 | | let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 216 | | }) [INFO] [stdout] 217 | | .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] 208 ~ layering [INFO] [stdout] 209 + .into_iter() [INFO] [stdout] 210 + .map(|layer| -> Vec { [INFO] [stdout] 211 + let mut keys: Vec = layer.keys().cloned().collect(); [INFO] [stdout] 212 + keys.sort(); [INFO] [stdout] 213 + keys.iter() [INFO] [stdout] 214 + .map(|key| -> String { layer.get(key).cloned().unwrap() }) [INFO] [stdout] 215 + .collect() [INFO] [stdout] 216 + }) [INFO] [stdout] 217 ~ .collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/ordered_hashmap/mod.rs:324:17 [INFO] [stdout] | [INFO] [stdout] 324 | / if let Some(index) = extracted_items.iter().position(|(key, _)| *key == k) { [INFO] [stdout] 325 | | Some(extracted_items.remove(index)) [INFO] [stdout] 326 | | } else { [INFO] [stdout] 327 | | None [INFO] [stdout] 328 | | } [INFO] [stdout] | |_________________^ help: try: `extracted_items.iter().position(|(key, _)| *key == k).map(|index| extracted_items.remove(index))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:229:13 [INFO] [stdout] | [INFO] [stdout] 229 | / graph [INFO] [stdout] 230 | | .node(v) [INFO] [stdout] 231 | | .unwrap_or(&GraphNode::default()) [INFO] [stdout] 232 | | .rank [INFO] [stdout] 233 | | .clone() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 229 ~ graph [INFO] [stdout] 230 + .node(v) [INFO] [stdout] 231 + .unwrap_or(&GraphNode::default()) [INFO] [stdout] 232 + .rank [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:20 [INFO] [stdout] | [INFO] [stdout] 266 | let rank = graph [INFO] [stdout] | ____________________^ [INFO] [stdout] 267 | | .node(v) [INFO] [stdout] 268 | | .unwrap_or(&GraphNode::default()) [INFO] [stdout] 269 | | .rank [INFO] [stdout] 270 | | .clone() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 266 ~ let rank = graph [INFO] [stdout] 267 + .node(v) [INFO] [stdout] 268 + .unwrap_or(&GraphNode::default()) [INFO] [stdout] 269 + .rank [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/layout/util.rs:273:22 [INFO] [stdout] | [INFO] [stdout] 273 | 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:277:28 [INFO] [stdout] | [INFO] [stdout] 277 | 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:279:12 [INFO] [stdout] | [INFO] [stdout] 279 | 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:279:29 [INFO] [stdout] | [INFO] [stdout] 279 | 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:285:63 [INFO] [stdout] | [INFO] [stdout] 285 | 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:307:5 [INFO] [stdout] | [INFO] [stdout] 307 | return add_dummy_node(graph, "border".to_string(), node, prefix.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] 307 - return add_dummy_node(graph, "border".to_string(), node, prefix.to_string()); [INFO] [stdout] 307 + add_dummy_node(graph, "border".to_string(), node, prefix.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:313:18 [INFO] [stdout] | [INFO] [stdout] 313 | .map(|v| 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:345:5 [INFO] [stdout] | [INFO] [stdout] 345 | 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] 345 - return result; [INFO] [stdout] 345 + 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:329:17 [INFO] [stdout] | [INFO] [stdout] 329 | collection: &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] 329 - collection: &Vec, [INFO] [stdout] 329 + collection: &[V], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | 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:519:5 [INFO] [stdout] | [INFO] [stdout] 519 | 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: length comparison to zero [INFO] [stdout] --> src/layout/mod.rs:43:16 [INFO] [stdout] | [INFO] [stdout] 43 | 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: useless use of `vec!` [INFO] [stdout] --> src/layout/position/bk.rs:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | 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:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | 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:604:9 [INFO] [stdout] | [INFO] [stdout] 604 | 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: unneeded `return` statement [INFO] [stdout] --> src/layout/mod.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | 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] 153 - return g; [INFO] [stdout] 153 + g [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ordered_hashmap/mod.rs:187:18 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn entry(&mut self, key: K) -> Entry { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 187 | pub fn entry(&mut self, key: K) -> Entry<'_, K, V> { [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:207:16 [INFO] [stdout] | [INFO] [stdout] 207 | 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:207:59 [INFO] [stdout] | [INFO] [stdout] 207 | 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:213:17 [INFO] [stdout] | [INFO] [stdout] 213 | 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:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | 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:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | _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:339:22 [INFO] [stdout] | [INFO] [stdout] 338 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 339 | 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:439:31 [INFO] [stdout] | [INFO] [stdout] 439 | 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:445:27 [INFO] [stdout] | [INFO] [stdout] 445 | 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:447:27 [INFO] [stdout] | [INFO] [stdout] 447 | 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:458:30 [INFO] [stdout] | [INFO] [stdout] 457 | if edge.points.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &mut edge.points` [INFO] [stdout] 458 | 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:456:9 [INFO] [stdout] | [INFO] [stdout] 456 | / if edge.reversed.clone().unwrap_or(false) { [INFO] [stdout] 457 | | if edge.points.is_some() { [INFO] [stdout] 458 | | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 459 | | points.reverse(); [INFO] [stdout] 460 | | } [INFO] [stdout] 461 | | } [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] 456 ~ if edge.reversed.clone().unwrap_or(false) [INFO] [stdout] 457 ~ && edge.points.is_some() { [INFO] [stdout] 458 | let points = edge.points.as_mut().unwrap(); [INFO] [stdout] 459 | points.reverse(); [INFO] [stdout] 460 ~ } [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:456:12 [INFO] [stdout] | [INFO] [stdout] 456 | 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:467:12 [INFO] [stdout] | [INFO] [stdout] 467 | 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:526:24 [INFO] [stdout] | [INFO] [stdout] 526 | 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:531:17 [INFO] [stdout] | [INFO] [stdout] 531 | _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:530:17 [INFO] [stdout] | [INFO] [stdout] 530 | 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:531:37 [INFO] [stdout] | [INFO] [stdout] 531 | _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:532:38 [INFO] [stdout] | [INFO] [stdout] 532 | _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:533:36 [INFO] [stdout] | [INFO] [stdout] 533 | _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: manual implementation of `Option::map` [INFO] [stdout] --> src/ordered_hashmap/mod.rs:237:17 [INFO] [stdout] | [INFO] [stdout] 237 | / if let Some(index) = extracted_items.iter().position(|(key, _)| *key == k) { [INFO] [stdout] 238 | | Some(extracted_items.remove(index).1) [INFO] [stdout] 239 | | } else { [INFO] [stdout] 240 | | None [INFO] [stdout] 241 | | } [INFO] [stdout] | |_________________^ help: try: `extracted_items.iter().position(|(key, _)| *key == k).map(|index| extracted_items.remove(index).1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/ordered_hashmap/mod.rs:324:17 [INFO] [stdout] | [INFO] [stdout] 324 | / if let Some(index) = extracted_items.iter().position(|(key, _)| *key == k) { [INFO] [stdout] 325 | | Some(extracted_items.remove(index)) [INFO] [stdout] 326 | | } else { [INFO] [stdout] 327 | | None [INFO] [stdout] 328 | | } [INFO] [stdout] | |_________________^ help: try: `extracted_items.iter().position(|(key, _)| *key == k).map(|index| extracted_items.remove(index))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/layout/order/sort_subgraph.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | 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:519:5 [INFO] [stdout] | [INFO] [stdout] 519 | 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:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | 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:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | 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:604:9 [INFO] [stdout] | [INFO] [stdout] 604 | 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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ordered_hashmap/mod.rs:187:18 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn entry(&mut self, key: K) -> Entry { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 187 | pub fn entry(&mut self, key: K) -> Entry<'_, K, V> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.12s [INFO] running `Command { std: "docker" "inspect" "07f029eb298b2b30d3ff687f0c42309e6d1f9e2b3e6df15cbe87f5d4fe2b04d5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "07f029eb298b2b30d3ff687f0c42309e6d1f9e2b3e6df15cbe87f5d4fe2b04d5", kill_on_drop: false }` [INFO] [stdout] 07f029eb298b2b30d3ff687f0c42309e6d1f9e2b3e6df15cbe87f5d4fe2b04d5