[INFO] cloning repository https://github.com/Reebix/leetcode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Reebix/leetcode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FReebix%2Fleetcode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FReebix%2Fleetcode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fec23a5069aff73c5a8ff1453b53c2723203fb01 [INFO] checking Reebix/leetcode against try#4f260f0f20b3133d20cfb50353c0221943af5796+rustflags=-Dunmustuse_in_always_ok for pr-148577 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FReebix%2Fleetcode" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Reebix/leetcode [INFO] finished tweaking git repo https://github.com/Reebix/leetcode [INFO] tweaked toml for git repo https://github.com/Reebix/leetcode written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Reebix/leetcode on toolchain 4f260f0f20b3133d20cfb50353c0221943af5796 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Reebix/leetcode 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" "+4f260f0f20b3133d20cfb50353c0221943af5796" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 808f74e93f6084b4702683cae05fec7180b3f6a2be6f4ec68a4520c94a398b19 [INFO] running `Command { std: "docker" "start" "-a" "808f74e93f6084b4702683cae05fec7180b3f6a2be6f4ec68a4520c94a398b19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "808f74e93f6084b4702683cae05fec7180b3f6a2be6f4ec68a4520c94a398b19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "808f74e93f6084b4702683cae05fec7180b3f6a2be6f4ec68a4520c94a398b19", kill_on_drop: false }` [INFO] [stdout] 808f74e93f6084b4702683cae05fec7180b3f6a2be6f4ec68a4520c94a398b19 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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 -Dunmustuse_in_always_ok" "-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8a39260888aed7516d2cb81b9e749d805c5dc760c820265ee11795c4115ccd0f [INFO] running `Command { std: "docker" "start" "-a" "8a39260888aed7516d2cb81b9e749d805c5dc760c820265ee11795c4115ccd0f", kill_on_drop: false }` [INFO] [stderr] Checking leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/longest_substring_without_repeating_characters.rs:2:40 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn length_of_longest_substring(s: String) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/zigzag_conversion.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | for i in 0..num_rows { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `merge_two_lists` is never used [INFO] [stdout] --> src/merge_two_sorted_lists.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn merge_two_lists(mut l1: Option>, mut l2: Option>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/merge_two_sorted_lists.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ListNode` is never constructed [INFO] [stdout] --> src/merge_two_sorted_lists.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct ListNode { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/merge_two_sorted_lists.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 32 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 33 | #[inline] [INFO] [stdout] 34 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `remove_element` is never used [INFO] [stdout] --> src/remove_element.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn remove_element(nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/remove_element.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `str_str` is never used [INFO] [stdout] --> src/find_the_index_of_the_first_occurrence_in_a_string.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn str_str(haystack: String, needle: String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/find_the_index_of_the_first_occurrence_in_a_string.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `divide` is never used [INFO] [stdout] --> src/divide_two_integers.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn divide(dividend: i32, divisor: i32) -> i32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/divide_two_integers.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `length_of_longest_substring` is never used [INFO] [stdout] --> src/longest_substring_without_repeating_characters.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn length_of_longest_substring(s: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/longest_substring_without_repeating_characters.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `length_of_last_word` is never used [INFO] [stdout] --> src/legth_of_last_word.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn length_of_last_word(s: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/legth_of_last_word.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LRUCache` is never constructed [INFO] [stdout] --> src/uses_cache.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct LRUCache { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Entry` is never constructed [INFO] [stdout] --> src/uses_cache.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Entry { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `move_in_cache`, `get`, and `put` are never used [INFO] [stdout] --> src/uses_cache.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 16 | impl LRUCache { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 17 | pub(crate) fn new(capacity: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | fn move_in_cache(&mut self, mut index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub(crate) fn get(&mut self, key: i32) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub(crate) fn put(&mut self, key: i32, value: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `rotate` is never used [INFO] [stdout] --> src/rotate_array.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn rotate(nums: &mut Vec, k: i32) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/rotate_array.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `rotate` is never used [INFO] [stdout] --> src/rotate_image.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn rotate(matrix: &mut Vec>) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/rotate_image.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `my_pow` is never used [INFO] [stdout] --> src/powx_n.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn my_pow(x: f64, n: i32) -> f64 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/powx_n.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ListNode` is never constructed [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct ListNode { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | #[inline] [INFO] [stdout] 10 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `modified_list` is never used [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 18 | pub fn modified_list(nums: Vec, mut head: Option>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_power_of_four` is never used [INFO] [stdout] --> src/power_of_four.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn is_power_of_four(n: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/power_of_four.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `single_number` is never used [INFO] [stdout] --> src/single_number.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn single_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/single_number.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_power_of_two` is never used [INFO] [stdout] --> src/power_of_two.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn is_power_of_two(n: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/power_of_two.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `sort_colors` is never used [INFO] [stdout] --> src/sort_colors.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn sort_colors(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/sort_colors.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `max_bottles_drunk` is never used [INFO] [stdout] --> src/water_bottles_ii.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn max_bottles_drunk(mut num_bottles: i32, mut num_exchange: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/water_bottles_ii.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/longest_substring_without_repeating_characters.rs:2:40 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn length_of_longest_substring(s: String) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:36:80 [INFO] [stdout] | [INFO] [stdout] 36 | println!("{}", longest_common_prefix::Solution::longest_common_prefix(vec!["flower".parse().unwrap(), "flow".parse().unwrap(), "fligh... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:36:107 [INFO] [stdout] | [INFO] [stdout] 36 | println!("{}", longest_common_prefix::Solution::longest_common_prefix(vec!["flower".parse().unwrap(), "flow".parse().unwrap(), "fligh... [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:36:132 [INFO] [stdout] | [INFO] [stdout] 36 | ...x(vec!["flower".parse().unwrap(), "flow".parse().unwrap(), "flight".parse().unwrap()])); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:37:80 [INFO] [stdout] | [INFO] [stdout] 37 | println!("{}", longest_common_prefix::Solution::longest_common_prefix(vec!["a".parse().unwrap()])); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/zigzag_conversion.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | for i in 0..num_rows { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode` (bin "leetcode" test) due to 4 previous errors; 39 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: associated function `merge_two_lists` is never used [INFO] [stdout] --> src/merge_two_sorted_lists.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn merge_two_lists(mut l1: Option>, mut l2: Option>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/merge_two_sorted_lists.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ListNode` is never constructed [INFO] [stdout] --> src/merge_two_sorted_lists.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct ListNode { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/merge_two_sorted_lists.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 32 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 33 | #[inline] [INFO] [stdout] 34 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `remove_element` is never used [INFO] [stdout] --> src/remove_element.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn remove_element(nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/remove_element.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `str_str` is never used [INFO] [stdout] --> src/find_the_index_of_the_first_occurrence_in_a_string.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn str_str(haystack: String, needle: String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/find_the_index_of_the_first_occurrence_in_a_string.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `divide` is never used [INFO] [stdout] --> src/divide_two_integers.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn divide(dividend: i32, divisor: i32) -> i32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/divide_two_integers.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `length_of_longest_substring` is never used [INFO] [stdout] --> src/longest_substring_without_repeating_characters.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn length_of_longest_substring(s: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/longest_substring_without_repeating_characters.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `length_of_last_word` is never used [INFO] [stdout] --> src/legth_of_last_word.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn length_of_last_word(s: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/legth_of_last_word.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LRUCache` is never constructed [INFO] [stdout] --> src/uses_cache.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct LRUCache { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Entry` is never constructed [INFO] [stdout] --> src/uses_cache.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Entry { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `move_in_cache`, `get`, and `put` are never used [INFO] [stdout] --> src/uses_cache.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 16 | impl LRUCache { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 17 | pub(crate) fn new(capacity: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | fn move_in_cache(&mut self, mut index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | pub(crate) fn get(&mut self, key: i32) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub(crate) fn put(&mut self, key: i32, value: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `rotate` is never used [INFO] [stdout] --> src/rotate_array.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn rotate(nums: &mut Vec, k: i32) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/rotate_array.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `rotate` is never used [INFO] [stdout] --> src/rotate_image.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn rotate(matrix: &mut Vec>) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/rotate_image.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `my_pow` is never used [INFO] [stdout] --> src/powx_n.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn my_pow(x: f64, n: i32) -> f64 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/powx_n.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ListNode` is never constructed [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct ListNode { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl ListNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | #[inline] [INFO] [stdout] 10 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `modified_list` is never used [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 18 | pub fn modified_list(nums: Vec, mut head: Option>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/delete_nodes_from_linked_list_present_in_array.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_power_of_four` is never used [INFO] [stdout] --> src/power_of_four.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn is_power_of_four(n: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/power_of_four.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `single_number` is never used [INFO] [stdout] --> src/single_number.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn single_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/single_number.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_power_of_two` is never used [INFO] [stdout] --> src/power_of_two.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn is_power_of_two(n: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/power_of_two.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `sort_colors` is never used [INFO] [stdout] --> src/sort_colors.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn sort_colors(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/sort_colors.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `max_bottles_drunk` is never used [INFO] [stdout] --> src/water_bottles_ii.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 1 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 2 | pub fn max_bottles_drunk(mut num_bottles: i32, mut num_exchange: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/water_bottles_ii.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:36:80 [INFO] [stdout] | [INFO] [stdout] 36 | println!("{}", longest_common_prefix::Solution::longest_common_prefix(vec!["flower".parse().unwrap(), "flow".parse().unwrap(), "fligh... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:36:107 [INFO] [stdout] | [INFO] [stdout] 36 | println!("{}", longest_common_prefix::Solution::longest_common_prefix(vec!["flower".parse().unwrap(), "flow".parse().unwrap(), "fligh... [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:36:132 [INFO] [stdout] | [INFO] [stdout] 36 | ...x(vec!["flower".parse().unwrap(), "flow".parse().unwrap(), "flight".parse().unwrap()])); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/main.rs:37:80 [INFO] [stdout] | [INFO] [stdout] 37 | println!("{}", longest_common_prefix::Solution::longest_common_prefix(vec!["a".parse().unwrap()])); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode` (bin "leetcode") due to 4 previous errors; 39 warnings emitted [INFO] running `Command { std: "docker" "inspect" "8a39260888aed7516d2cb81b9e749d805c5dc760c820265ee11795c4115ccd0f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8a39260888aed7516d2cb81b9e749d805c5dc760c820265ee11795c4115ccd0f", kill_on_drop: false }` [INFO] [stdout] 8a39260888aed7516d2cb81b9e749d805c5dc760c820265ee11795c4115ccd0f