[INFO] cloning repository https://github.com/cdavidr1/algos_in_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cdavidr1/algos_in_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdavidr1%2Falgos_in_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdavidr1%2Falgos_in_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 39aeee883ed933173bb442877609e87cb8dad7bf [INFO] linting cdavidr1/algos_in_rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdavidr1%2Falgos_in_rust" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cdavidr1/algos_in_rust [INFO] finished tweaking git repo https://github.com/cdavidr1/algos_in_rust [INFO] tweaked toml for git repo https://github.com/cdavidr1/algos_in_rust written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cdavidr1/algos_in_rust 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/cdavidr1/algos_in_rust 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b1b3ab1089f5ebe29cde6fc01ed1d0a0b3338982dadfd48ef6311928842a4d63 [INFO] running `Command { std: "docker" "start" "-a" "b1b3ab1089f5ebe29cde6fc01ed1d0a0b3338982dadfd48ef6311928842a4d63", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b1b3ab1089f5ebe29cde6fc01ed1d0a0b3338982dadfd48ef6311928842a4d63", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b1b3ab1089f5ebe29cde6fc01ed1d0a0b3338982dadfd48ef6311928842a4d63", kill_on_drop: false }` [INFO] [stdout] b1b3ab1089f5ebe29cde6fc01ed1d0a0b3338982dadfd48ef6311928842a4d63 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b9ae175d50c891a0070b5a992f821191250283867de9b403b38e5a91d9b41e7d [INFO] running `Command { std: "docker" "start" "-a" "b9ae175d50c891a0070b5a992f821191250283867de9b403b38e5a91d9b41e7d", kill_on_drop: false }` [INFO] [stderr] Checking algos_in_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: trait `Internable` is never used [INFO] [stdout] --> src/subprograms/6_traits.rs:16:7 [INFO] [stdout] | [INFO] [stdout] 16 | trait Internable { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Internable` is never used [INFO] [stdout] --> src/subprograms/6_traits.rs:16:7 [INFO] [stdout] | [INFO] [stdout] 16 | trait Internable { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/dsu/dsu.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** [INFO] [stdout] 2 | | [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | new: [INFO] [stdout] ... | [INFO] [stdout] 15 | | */ [INFO] [stdout] 16 | | [INFO] [stdout] | |_^ [INFO] [stdout] 17 | pub struct Dsu { [INFO] [stdout] | -------------- the comment documents this struct [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 comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** [INFO] [stdout] 1 + /*! [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/dsu/dsu.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** [INFO] [stdout] 2 | | [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | new: [INFO] [stdout] ... | [INFO] [stdout] 15 | | */ [INFO] [stdout] 16 | | [INFO] [stdout] | |_^ [INFO] [stdout] 17 | pub struct Dsu { [INFO] [stdout] | -------------- the comment documents this struct [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 comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** [INFO] [stdout] 1 + /*! [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `concat` [INFO] [stdout] --> src/main.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let concat = concat_str("abc", "def"); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_concat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Dsu` is never constructed [INFO] [stdout] --> src/dsu/dsu.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Dsu { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `make_set`, and `find_set` are never used [INFO] [stdout] --> src/dsu/dsu.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 21 | impl Dsu { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] 22 | pub fn new(size: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn make_set(&mut self, v: i32) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub fn find_set(&self, v: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FenwickTree` is never constructed [INFO] [stdout] --> src/fenwick_tree/fenwick_tree.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct FenwickTree { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `construct_and_build`, `new`, `add`, `range_sum_from_zero`, and `range_sum` are never used [INFO] [stdout] --> src/fenwick_tree/fenwick_tree.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl FenwickTree { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 6 | pub fn construct_and_build(input: &[i32]) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | fn new(input: &[i32]) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn add(&mut self, mut idx: usize, delta: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn range_sum_from_zero(&self, mut r: usize) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn range_sum(&self, l: usize, r: usize) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Edge` is never constructed [INFO] [stdout] --> src/graph/edge.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct Edge { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/graph/edge.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 6 | impl Edge { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 7 | pub fn new(start: usize, end: usize, weight: Option) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Graph` is never constructed [INFO] [stdout] --> src/graph/graph.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Graph { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/graph/graph.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Graph { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 11 | fn new(is_weighted: bool, is_directed: bool) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn add_vertex(&mut self, data: String) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn add_edge(&mut self, from_id: usize, to_id: usize, _weight: Option) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | fn remove_edge(&mut self, from_id: usize, to_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | fn remove_vertex(&mut self, vertex_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | fn get_vertex_by_value(&self, value: String) -> Option<&Vertex> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | fn get_vertex(&self, id: usize) -> Option<&Vertex> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | pub fn print(self, is_weighted: bool) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Vertex` is never constructed [INFO] [stdout] --> src/graph/vertex.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Vertex { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_edge`, `remove_edge`, and `get_data` are never used [INFO] [stdout] --> src/graph/vertex.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Vertex { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 8 | pub fn new(id: usize, data: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn add_edge(&mut self, end: usize, weight: Option) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn remove_edge(&mut self, end: usize) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn get_data(&self) -> &str { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PriorityQueue` is never constructed [INFO] [stdout] --> src/priority_queue/priority_queue.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct PriorityQueue [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/priority_queue/priority_queue.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 23 | / impl PriorityQueue [INFO] [stdout] 24 | | where [INFO] [stdout] 25 | | T: PartialOrd + Hash + Eq + Clone, [INFO] [stdout] | |______________________________________- associated items in this implementation [INFO] [stdout] 26 | { [INFO] [stdout] 27 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn make_p_q(elems: &[T]) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | fn map_add(&mut self, elem: T, index: usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | fn map_update(&mut self, elem: &T, old: usize, new: usize) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | fn sink(&mut self, mut index: usize) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | fn swim(&mut self, mut index: usize) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | fn less(&self, i: usize, j: usize) -> bool { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 100 | fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 104 | fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 109 | fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | fn swap(&mut self, i: usize, j: usize) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 124 | fn peek(&self) -> Option<&T> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | fn poll(&mut self) -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 136 | fn remove_at(&mut self, index: usize) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 159 | fn contains(&self, elem: T) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | fn add(&mut self, elem: T) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Queue` is never constructed [INFO] [stdout] --> src/queue/queue.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Queue { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/queue/queue.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Queue { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 10 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn enqueue(&mut self, elem: T) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn dequeue(&mut self) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn peek_option(&self) -> Option<&T> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn contains(&self, elem: T) -> bool [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn remove(&mut self, index: usize) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:199:4 [INFO] [stdout] | [INFO] [stdout] 199 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Function` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:3:14 [INFO] [stdout] | [INFO] [stdout] 3 | pub enum Function { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_power_of_two` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn is_power_of_two(n: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gcd` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn gcd(mut a: i32, mut b: i32) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SegmentTree` is never constructed [INFO] [stdout] --> src/segment_tree/segment_tree.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct SegmentTree { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:38:16 [INFO] [stdout] | [INFO] [stdout] 37 | impl SegmentTree { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 38 | pub fn construct_and_build(input: &[i32], result: Function) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub fn new(nodes: usize, result: Function) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | fn find_result(&self, left: (i32, i32), right: (i32, i32)) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | fn build(&mut self, input: &[i32], vertex: usize, left: usize, right: usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub fn update(&mut self, index: usize, value: i32) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | fn update_helper( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn get_segment(self, x: usize, y: usize) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 131 | fn get_segment_helper( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | pub fn print_tree_structure(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 178 | fn find_kth_zero(&self, v: usize, left: usize, right: usize, k: i32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Stack` is never constructed [INFO] [stdout] --> src/stack/stack.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Stack { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/stack/stack.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 6 | impl Stack { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 7 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 11 | pub fn with_capacity(capacity: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn push(&mut self, elem: T) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn pop(&mut self) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn peek(&self) -> Option<&T> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | pub fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/dsu/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod dsu; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/fenwick_tree/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod fenwick_tree; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/fenwick_tree/fenwick_tree.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | for i in 0..tree.bit.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 8 - for i in 0..tree.bit.len() { [INFO] [stdout] 8 + for (i, ) in input.iter().enumerate().take(tree.bit.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/graph/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod graph; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/graph/graph.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | if !self.get_vertex(0).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_vertex(0).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: length comparison to zero [INFO] [stdout] --> src/graph/graph.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 77 | if self.edges.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.edges.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/graph/graph.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | message.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `message.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/priority_queue/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod priority_queue; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/priority_queue/priority_queue.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | .or_insert_with(BTreeSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.heap.get(0)` [INFO] [stdout] --> src/priority_queue/priority_queue.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | self.heap.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `self.heap.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/priority_queue/priority_queue.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | return None; [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] 156 - return None; [INFO] [stdout] 156 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/queue/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod queue; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/segment_tree/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod segment_tree; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GCD` contains a capitalized acronym [INFO] [stdout] --> src/segment_tree/segment_tree.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | GCD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LCM` contains a capitalized acronym [INFO] [stdout] --> src/segment_tree/segment_tree.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | LCM, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Lcm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/segment_tree/segment_tree.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / pub mod segment_tree { [INFO] [stdout] 28 | | [INFO] [stdout] 29 | | use super::function::{gcd, is_power_of_two, Function}; [INFO] [stdout] ... | [INFO] [stdout] 193 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/segment_tree/segment_tree.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | tree.build(&input, 1, 0, tree.nodes - 1); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: unneeded `return` statement [INFO] [stdout] --> src/segment_tree/segment_tree.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | return self.find_kth_zero(v * 2, left, mid, k); [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] 187 - return self.find_kth_zero(v * 2, left, mid, k); [INFO] [stdout] 187 + self.find_kth_zero(v * 2, left, mid, k) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/segment_tree/segment_tree.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | return self.find_kth_zero(v * 2 + 1, mid + 1, right, k - self.tree[v * 2].0); [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] 189 - return self.find_kth_zero(v * 2 + 1, mid + 1, right, k - self.tree[v * 2].0); [INFO] [stdout] 189 + self.find_kth_zero(v * 2 + 1, mid + 1, right, k - self.tree[v * 2].0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/stack/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod stack; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `concat` [INFO] [stdout] --> src/main.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let concat = concat_str("abc", "def"); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_concat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `range_sum_from_zero` and `range_sum` are never used [INFO] [stdout] --> src/fenwick_tree/fenwick_tree.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl FenwickTree { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn range_sum_from_zero(&self, mut r: usize) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn range_sum(&self, l: usize, r: usize) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/priority_queue/priority_queue.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 23 | / impl PriorityQueue [INFO] [stdout] 24 | | where [INFO] [stdout] 25 | | T: PartialOrd + Hash + Eq + Clone, [INFO] [stdout] | |______________________________________- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 83 | fn swim(&mut self, mut index: usize) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 100 | fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 124 | fn peek(&self) -> Option<&T> { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | fn poll(&mut self) -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 136 | fn remove_at(&mut self, index: usize) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 159 | fn contains(&self, elem: T) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | fn add(&mut self, elem: T) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:199:4 [INFO] [stdout] | [INFO] [stdout] 199 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Min`, `Sum`, `GCD`, `LCM`, and `Zeros` are never constructed [INFO] [stdout] --> src/segment_tree/segment_tree.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 3 | pub enum Function { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 4 | Max, [INFO] [stdout] 5 | Min, [INFO] [stdout] | ^^^ [INFO] [stdout] 6 | Sum, [INFO] [stdout] | ^^^ [INFO] [stdout] 7 | GCD, [INFO] [stdout] | ^^^ [INFO] [stdout] 8 | LCM, [INFO] [stdout] | ^^^ [INFO] [stdout] 9 | Zeros, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Function` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_power_of_two` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn is_power_of_two(n: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gcd` is never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn gcd(mut a: i32, mut b: i32) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `result` is never read [INFO] [stdout] --> src/segment_tree/segment_tree.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct SegmentTree { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 34 | result: Function, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/segment_tree/segment_tree.rs:38:16 [INFO] [stdout] | [INFO] [stdout] 37 | impl SegmentTree { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 38 | pub fn construct_and_build(input: &[i32], result: Function) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | fn find_result(&self, left: (i32, i32), right: (i32, i32)) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | fn build(&mut self, input: &[i32], vertex: usize, left: usize, right: usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 94 | pub fn update(&mut self, index: usize, value: i32) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | fn update_helper( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn get_segment(self, x: usize, y: usize) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 131 | fn get_segment_helper( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | pub fn print_tree_structure(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 178 | fn find_kth_zero(&self, v: usize, left: usize, right: usize, k: i32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/dsu/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod dsu; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.iter().next()` on an array [INFO] [stdout] --> src/dsu/dsu.rs:50:42 [INFO] [stdout] | [INFO] [stdout] 50 | assert_eq!(dsu_set.find_set(0), *dsu_set.parent.iter().next().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling: `dsu_set.parent.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice [INFO] [stdout] = note: `#[warn(clippy::iter_next_slice)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/fenwick_tree/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod fenwick_tree; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/fenwick_tree/fenwick_tree.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | for i in 0..tree.bit.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 8 - for i in 0..tree.bit.len() { [INFO] [stdout] 8 + for (i, ) in input.iter().enumerate().take(tree.bit.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/graph/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod graph; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/graph/graph.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | if !self.get_vertex(0).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_vertex(0).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: length comparison to zero [INFO] [stdout] --> src/graph/graph.rs:77:12 [INFO] [stdout] | [INFO] [stdout] 77 | if self.edges.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.edges.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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/graph/graph.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | message.push_str(")"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `message.push(')')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/graph/graph.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | assert_eq!(g.is_directed, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 118 - assert_eq!(g.is_directed, true); [INFO] [stdout] 118 + assert!(g.is_directed); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/priority_queue/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod priority_queue; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/priority_queue/priority_queue.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | .or_insert_with(BTreeSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.heap.get(0)` [INFO] [stdout] --> src/priority_queue/priority_queue.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | self.heap.get(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `self.heap.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/priority_queue/priority_queue.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | return None; [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] 156 - return None; [INFO] [stdout] 156 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/queue/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod queue; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/queue/queue.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 59 | let q = Queue::default(); [INFO] [stdout] | ------------------------- unnecessary `let` binding [INFO] [stdout] 60 | q [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 59 ~ [INFO] [stdout] 60 ~ Queue::default() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/queue/queue.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | assert_eq!(c.is_empty(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 72 - assert_eq!(c.is_empty(), true); [INFO] [stdout] 72 + assert!(c.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/queue/queue.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | assert_eq!(c.contains(6), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 95 - assert_eq!(c.contains(6), true); [INFO] [stdout] 95 + assert!(c.contains(6)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/segment_tree/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod segment_tree; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GCD` contains a capitalized acronym [INFO] [stdout] --> src/segment_tree/segment_tree.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | GCD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Gcd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LCM` contains a capitalized acronym [INFO] [stdout] --> src/segment_tree/segment_tree.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | LCM, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Lcm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/segment_tree/segment_tree.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / pub mod segment_tree { [INFO] [stdout] 28 | | [INFO] [stdout] 29 | | use super::function::{gcd, is_power_of_two, Function}; [INFO] [stdout] ... | [INFO] [stdout] 193 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/segment_tree/segment_tree.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | tree.build(&input, 1, 0, tree.nodes - 1); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: unneeded `return` statement [INFO] [stdout] --> src/segment_tree/segment_tree.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | return self.find_kth_zero(v * 2, left, mid, k); [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] 187 - return self.find_kth_zero(v * 2, left, mid, k); [INFO] [stdout] 187 + self.find_kth_zero(v * 2, left, mid, k) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/segment_tree/segment_tree.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | return self.find_kth_zero(v * 2 + 1, mid + 1, right, k - self.tree[v * 2].0); [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] 189 - return self.find_kth_zero(v * 2 + 1, mid + 1, right, k - self.tree[v * 2].0); [INFO] [stdout] 189 + self.find_kth_zero(v * 2 + 1, mid + 1, right, k - self.tree[v * 2].0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/stack/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod stack; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/stack/stack.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | assert_eq!(false, ne.is_empty()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 84 - assert_eq!(false, ne.is_empty()); [INFO] [stdout] 84 + assert!(!ne.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.37s [INFO] running `Command { std: "docker" "inspect" "b9ae175d50c891a0070b5a992f821191250283867de9b403b38e5a91d9b41e7d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b9ae175d50c891a0070b5a992f821191250283867de9b403b38e5a91d9b41e7d", kill_on_drop: false }` [INFO] [stdout] b9ae175d50c891a0070b5a992f821191250283867de9b403b38e5a91d9b41e7d