[INFO] cloning repository https://github.com/Zapix/leetcode-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Zapix/leetcode-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZapix%2Fleetcode-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZapix%2Fleetcode-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6559aa212192f06069768384cea45f4443e420b6 [INFO] building Zapix/leetcode-rust against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZapix%2Fleetcode-rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Zapix/leetcode-rust on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/Zapix/leetcode-rust [INFO] finished tweaking git repo https://github.com/Zapix/leetcode-rust [INFO] tweaked toml for git repo https://github.com/Zapix/leetcode-rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/Zapix/leetcode-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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0aea1937bcd19c4ca726ff435cf7def04f13903d18f706f4d3a666e877bff94b [INFO] running `Command { std: "docker" "start" "-a" "0aea1937bcd19c4ca726ff435cf7def04f13903d18f706f4d3a666e877bff94b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0aea1937bcd19c4ca726ff435cf7def04f13903d18f706f4d3a666e877bff94b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0aea1937bcd19c4ca726ff435cf7def04f13903d18f706f4d3a666e877bff94b", kill_on_drop: false }` [INFO] [stdout] 0aea1937bcd19c4ca726ff435cf7def04f13903d18f706f4d3a666e877bff94b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2a09639fb56941572f4d802992a56a8154a77a2969a6dc928f613defa5091d6e [INFO] running `Command { std: "docker" "start" "-a" "2a09639fb56941572f4d802992a56a8154a77a2969a6dc928f613defa5091d6e", kill_on_drop: false }` [INFO] [stderr] Compiling leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/problems/find_unique_binary_string.rs:9:20 [INFO] [stdout] | [INFO] [stdout] 9 | val += (c as i32 - '0' as i32); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 9 - val += (c as i32 - '0' as i32); [INFO] [stdout] 9 + val += c as i32 - '0' as i32; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown lint: `daed_code` [INFO] [stdout] --> src/problems/integer_to_english_words.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | #[allow(daed_code)] [INFO] [stdout] | ^^^^^^^^^ help: did you mean: `dead_code` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unknown_lints)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/problems/kth_smallest_pair_distance.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::os::unix::raw::off_t` [INFO] [stdout] --> src/problems/longest_happy_string.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::os::unix::raw::off_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/problems/longest_substring_with_even_vowels.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/problems/longest_substring_with_even_vowels.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/problems/max_distance_in_array_v2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/problems/maximal_score_after_applying_k_operations.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | for _ in (0..k) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 11 - for _ in (0..k) { [INFO] [stdout] 11 + for _ in 0..k { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/problems/maximum_element_after_decrementing_and_rearranging.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/modify_graph_edge_weights.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | if (visited.contains(&node)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - if (visited.contains(&node)) { [INFO] [stdout] 19 + if visited.contains(&node) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/problems/range_sum_of_sorted_sub_arrays_sums.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/rotate_string.rs:16:32 [INFO] [stdout] | [INFO] [stdout] 16 | .filter_map(|x| if (x.1 == first_char) { Some(x.0) } else { None }) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 16 - .filter_map(|x| if (x.1 == first_char) { Some(x.0) } else { None }) [INFO] [stdout] 16 + .filter_map(|x| if x.1 == first_char { Some(x.0) } else { None }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/problems/shortest_distance_after_road_additional_queries.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, VecDeque}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/shortest_subarray_with_or_at_least_k_ii.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | if (j <= i) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 59 - if (j <= i) { [INFO] [stdout] 59 + if j <= i { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::problems::spiral_matrix_iv::Direction::Down` [INFO] [stdout] --> src/problems/spiral_matrix_iv.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::problems::spiral_matrix_iv::Direction::Down; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/split_linked_list_into_parts.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if (rest > 0) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 49 - if (rest > 0) { [INFO] [stdout] 49 + if rest > 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/problems/stranger_printer.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | for i in (1..chars.len()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 10 - for i in (1..chars.len()) { [INFO] [stdout] 10 + for i in 1..chars.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/stranger_printer.rs:11:16 [INFO] [stdout] | [INFO] [stdout] 11 | if (chars[i] == chars[(i as i32 - 1) as usize]) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 11 - if (chars[i] == chars[(i as i32 - 1) as usize]) { [INFO] [stdout] 11 + if chars[i] == chars[(i as i32 - 1) as usize] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/problems/sum_of_digits_of_string.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated type alias `std::os::unix::raw::off_t`: these type aliases are no longer supported by the standard library, the `libc` crate on crates.io should be used instead for the correct definitions [INFO] [stdout] --> src/problems/longest_happy_string.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use std::os::unix::raw::off_t; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/binary_tree_postorder_traversal.rs:34:25 [INFO] [stdout] | [INFO] [stdout] 34 | let mut current = current.clone(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `parent_node` [INFO] [stdout] --> src/problems/cousins_in_binary_tree_ii.rs:40:28 [INFO] [stdout] | [INFO] [stdout] 40 | let (node, parent_node) = &stack[i]; [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parent_node` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/problems/defuse_the_bomb.rs:16:53 [INFO] [stdout] | [INFO] [stdout] 16 | Ordering::Equal => (0..code.len()).map(|x| 0).collect::>(), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/find_closest_palindrome.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | let mut num = n.parse::().unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cnt` [INFO] [stdout] --> src/problems/minimum_number_of_days_to_disconnect_islinad.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | let cnt= Self::count_islands(&grid); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_cnt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/permutation_in_string.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | let mut val = window.get_mut(&exclude_char).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/prime_subtraction_operation.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | let mut i = match primes.binary_search(&val) { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/problems/remove_stones_to_minimize_total.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | for i in 0..k { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/stranger_printer.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | let mut chars = s.chars().collect::>(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/take_k_of_each_characters_from_left_and_right.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut counter = s.chars().fold( [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/problems/ugly_number_ii.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | for i in 0..n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/uncommon_words_from_two_sentences.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | let mut val = acc.get_mut(x).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/binary_tree_postorder_traversal.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 16 | #[inline] [INFO] [stdout] 17 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/common_struct.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 13 | #[inline] [INFO] [stdout] 14 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/cousins_in_binary_tree_ii.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 13 | #[inline] [INFO] [stdout] 14 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/problems/design_circulare_deque.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyCircularDeque` is never constructed [INFO] [stdout] --> src/problems/design_circulare_deque.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct MyCircularDeque { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/problems/design_circulare_deque.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 21 | impl MyCircularDeque { [INFO] [stdout] | -------------------- associated items in this implementation [INFO] [stdout] 22 | fn new(k: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | fn insert_front(&mut self, value: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | fn insert_last(&mut self, value: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | fn delete_front(&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | fn delete_last(&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 112 | fn get_front(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 120 | fn get_rear(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | fn is_full(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `parse_binary` and `find_different_binary_string` are never used [INFO] [stdout] --> src/problems/find_unique_binary_string.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 4 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 5 | pub fn parse_binary(s: &String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | pub fn find_different_binary_string(nums: Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `get_counter`, `includes`, and `count_characters` are never used [INFO] [stdout] --> src/problems/find_words_than_can_be_formed.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 6 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 7 | [INFO] [stdout] 8 | pub fn get_counter(chars: &String) -> HashMap { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn includes(a: &HashMap, b: &HashMap) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn count_characters(words: Vec, chars: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated functions are never used [INFO] [stdout] --> src/problems/integer_to_english_words.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 8 | [INFO] [stdout] 9 | fn by_digits(num: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | fn by_group_of_3(digits: Vec) -> Vec>> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn get_digit_word(value: &i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | fn get_teen_word(value: &i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | fn get_tens_word(value: &i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn group_by_3_to_words(group: Ref>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | pub fn number_to_words(num: i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/kth_largest_sum_in_a_binary_tree.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 12 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/linked_list_in_binary_tree.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 12 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/linked_list_in_binary_tree.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 25 | #[inline] [INFO] [stdout] 26 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `maximum_element_after_decrementing_and_rearranging` is never used [INFO] [stdout] --> src/problems/maximum_element_after_decrementing_and_rearranging.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 6 | pub fn maximum_element_after_decrementing_and_rearranging(arr: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `min_pair_sum` is never used [INFO] [stdout] --> src/problems/minimize_maximum_pair_sum_in_array.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 4 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 5 | pub fn min_pair_sum(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/spiral_matrix_iv.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ListNode` is never constructed [INFO] [stdout] --> src/problems/split_linked_list_into_parts.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct ListNode { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/split_linked_list_into_parts.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `split_list_to_parts` is never used [INFO] [stdout] --> src/problems/split_linked_list_into_parts.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 19 | pub fn split_list_to_parts(head: Option>, k: i32) -> Vec>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, and `increment` are never used [INFO] [stdout] --> src/problems/stack_with_increment_operation.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl CustomStack { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 12 | fn new(maxSize: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | fn increment(&mut self, k: i32, val: i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/problems/shortest_subarray_to_be_removed_to_make_array_sorted.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while right_decrease >= 0 && arr[right_decrease] <= *prev { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `maxSize` should have a snake case name [INFO] [stdout] --> src/problems/stack_with_increment_operation.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | fn new(maxSize: i32) -> Self { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `max_size` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.73s [INFO] running `Command { std: "docker" "inspect" "2a09639fb56941572f4d802992a56a8154a77a2969a6dc928f613defa5091d6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a09639fb56941572f4d802992a56a8154a77a2969a6dc928f613defa5091d6e", kill_on_drop: false }` [INFO] [stdout] 2a09639fb56941572f4d802992a56a8154a77a2969a6dc928f613defa5091d6e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2b1c7733553263ce0f1581f85e851d18dfbd00ab8854bc0954036bbb8b7e9459 [INFO] running `Command { std: "docker" "start" "-a" "2b1c7733553263ce0f1581f85e851d18dfbd00ab8854bc0954036bbb8b7e9459", kill_on_drop: false }` [INFO] [stderr] Compiling leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/problems/find_unique_binary_string.rs:9:20 [INFO] [stdout] | [INFO] [stdout] 9 | val += (c as i32 - '0' as i32); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 9 - val += (c as i32 - '0' as i32); [INFO] [stdout] 9 + val += c as i32 - '0' as i32; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unknown lint: `daed_code` [INFO] [stdout] --> src/problems/integer_to_english_words.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | #[allow(daed_code)] [INFO] [stdout] | ^^^^^^^^^ help: did you mean: `dead_code` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unknown_lints)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/problems/kth_smallest_pair_distance.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::os::unix::raw::off_t` [INFO] [stdout] --> src/problems/longest_happy_string.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::os::unix::raw::off_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/problems/longest_substring_with_even_vowels.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/problems/longest_substring_with_even_vowels.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/problems/max_distance_in_array_v2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/problems/maximal_score_after_applying_k_operations.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | for _ in (0..k) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 11 - for _ in (0..k) { [INFO] [stdout] 11 + for _ in 0..k { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/problems/maximum_element_after_decrementing_and_rearranging.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/modify_graph_edge_weights.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | if (visited.contains(&node)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - if (visited.contains(&node)) { [INFO] [stdout] 19 + if visited.contains(&node) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/problems/range_sum_of_sorted_sub_arrays_sums.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/rotate_string.rs:16:32 [INFO] [stdout] | [INFO] [stdout] 16 | .filter_map(|x| if (x.1 == first_char) { Some(x.0) } else { None }) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 16 - .filter_map(|x| if (x.1 == first_char) { Some(x.0) } else { None }) [INFO] [stdout] 16 + .filter_map(|x| if x.1 == first_char { Some(x.0) } else { None }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/problems/shortest_distance_after_road_additional_queries.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, VecDeque}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/shortest_subarray_with_or_at_least_k_ii.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | if (j <= i) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 59 - if (j <= i) { [INFO] [stdout] 59 + if j <= i { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::problems::spiral_matrix_iv::Direction::Down` [INFO] [stdout] --> src/problems/spiral_matrix_iv.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::problems::spiral_matrix_iv::Direction::Down; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/split_linked_list_into_parts.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if (rest > 0) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 49 - if (rest > 0) { [INFO] [stdout] 49 + if rest > 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/problems/stranger_printer.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | for i in (1..chars.len()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 10 - for i in (1..chars.len()) { [INFO] [stdout] 10 + for i in 1..chars.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/problems/stranger_printer.rs:11:16 [INFO] [stdout] | [INFO] [stdout] 11 | if (chars[i] == chars[(i as i32 - 1) as usize]) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 11 - if (chars[i] == chars[(i as i32 - 1) as usize]) { [INFO] [stdout] 11 + if chars[i] == chars[(i as i32 - 1) as usize] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated type alias `std::os::unix::raw::off_t`: these type aliases are no longer supported by the standard library, the `libc` crate on crates.io should be used instead for the correct definitions [INFO] [stdout] --> src/problems/longest_happy_string.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use std::os::unix::raw::off_t; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/all_one.rs:132:13 [INFO] [stdout] | [INFO] [stdout] 132 | let mut all_one = AllOne::new(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/binary_tree_postorder_traversal.rs:34:25 [INFO] [stdout] | [INFO] [stdout] 34 | let mut current = current.clone(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `parent_node` [INFO] [stdout] --> src/problems/cousins_in_binary_tree_ii.rs:40:28 [INFO] [stdout] | [INFO] [stdout] 40 | let (node, parent_node) = &stack[i]; [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parent_node` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/problems/defuse_the_bomb.rs:16:53 [INFO] [stdout] | [INFO] [stdout] 16 | Ordering::Equal => (0..code.len()).map(|x| 0).collect::>(), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/find_closest_palindrome.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | let mut num = n.parse::().unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/insert_gcd_in_linked_list.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let mut current = &mut head; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cnt` [INFO] [stdout] --> src/problems/minimum_number_of_days_to_disconnect_islinad.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | let cnt= Self::count_islands(&grid); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_cnt` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/permutation_in_string.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | let mut val = window.get_mut(&exclude_char).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/prime_subtraction_operation.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | let mut i = match primes.binary_search(&val) { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/problems/remove_stones_to_minimize_total.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | for i in 0..k { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/stranger_printer.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | let mut chars = s.chars().collect::>(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/take_k_of_each_characters_from_left_and_right.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut counter = s.chars().fold( [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/problems/ugly_number_ii.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | for i in 0..n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/problems/uncommon_words_from_two_sentences.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | let mut val = acc.get_mut(x).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/binary_tree_postorder_traversal.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 16 | #[inline] [INFO] [stdout] 17 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/cousins_in_binary_tree_ii.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 13 | #[inline] [INFO] [stdout] 14 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `delete_front` and `is_empty` are never used [INFO] [stdout] --> src/problems/design_circulare_deque.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 21 | impl MyCircularDeque { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 84 | fn delete_front(&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/linked_list_in_binary_tree.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 12 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/linked_list_in_binary_tree.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 25 | #[inline] [INFO] [stdout] 26 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_max_moves_case3` is never used [INFO] [stdout] --> src/problems/maximum_number_of_moves_in_a_grid.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | fn test_max_moves_case3() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `leetcode_7` is never used [INFO] [stdout] --> src/problems/sentence_similarity_iii.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | fn leetcode_7() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/problems/spiral_matrix_iv.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/problems/shortest_subarray_to_be_removed_to_make_array_sorted.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while right_decrease >= 0 && arr[right_decrease] <= *prev { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `maxSize` should have a snake case name [INFO] [stdout] --> src/problems/stack_with_increment_operation.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | fn new(maxSize: i32) -> Self { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `max_size` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 2.36s [INFO] running `Command { std: "docker" "inspect" "2b1c7733553263ce0f1581f85e851d18dfbd00ab8854bc0954036bbb8b7e9459", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2b1c7733553263ce0f1581f85e851d18dfbd00ab8854bc0954036bbb8b7e9459", kill_on_drop: false }` [INFO] [stdout] 2b1c7733553263ce0f1581f85e851d18dfbd00ab8854bc0954036bbb8b7e9459