[INFO] cloning repository https://github.com/KitBurgess/coding-challenges-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/KitBurgess/coding-challenges-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKitBurgess%2Fcoding-challenges-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKitBurgess%2Fcoding-challenges-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 86a3e8095dcb195807d7e4f1e7efc51ad940df91 [INFO] checking KitBurgess/coding-challenges-rust/86a3e8095dcb195807d7e4f1e7efc51ad940df91 against master#ab869e094a907cc5d19b4080f22eccaf347f1f95 for pr-129604 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKitBurgess%2Fcoding-challenges-rust" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/KitBurgess/coding-challenges-rust on toolchain ab869e094a907cc5d19b4080f22eccaf347f1f95 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/KitBurgess/coding-challenges-rust [INFO] finished tweaking git repo https://github.com/KitBurgess/coding-challenges-rust [INFO] tweaked toml for git repo https://github.com/KitBurgess/coding-challenges-rust written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/KitBurgess/coding-challenges-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" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 939828e757a347546506deeb04bca091e02cb1a75782cf5cc08879a3df501ad9 [INFO] running `Command { std: "docker" "start" "-a" "939828e757a347546506deeb04bca091e02cb1a75782cf5cc08879a3df501ad9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "939828e757a347546506deeb04bca091e02cb1a75782cf5cc08879a3df501ad9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "939828e757a347546506deeb04bca091e02cb1a75782cf5cc08879a3df501ad9", kill_on_drop: false }` [INFO] [stdout] 939828e757a347546506deeb04bca091e02cb1a75782cf5cc08879a3df501ad9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2dc8598b11775e5f1e854af24f3631eb4afb2b71f4cede01d3c5dcf78e76c6e9 [INFO] running `Command { std: "docker" "start" "-a" "2dc8598b11775e5f1e854af24f3631eb4afb2b71f4cede01d3c5dcf78e76c6e9", kill_on_drop: false }` [INFO] [stderr] Checking problems v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/arrays_strings.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, HashSet, VecDeque}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/arrays_strings.rs:332:31 [INFO] [stdout] | [INFO] [stdout] 332 | .map(|x| i32::max((x[1] - x[0]), 0)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 332 - .map(|x| i32::max((x[1] - x[0]), 0)) [INFO] [stdout] 332 + .map(|x| i32::max(x[1] - x[0], 0)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/arrays_strings.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, HashSet, VecDeque}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/arrays_strings.rs:332:31 [INFO] [stdout] | [INFO] [stdout] 332 | .map(|x| i32::max((x[1] - x[0]), 0)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 332 - .map(|x| i32::max((x[1] - x[0]), 0)) [INFO] [stdout] 332 + .map(|x| i32::max(x[1] - x[0], 0)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current` is never read [INFO] [stdout] --> src/arrays_strings.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | let mut current = 0; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/arrays_strings.rs:207:13 [INFO] [stdout] | [INFO] [stdout] 207 | let mut set: std::collections::HashSet = nums.into_iter().collect(); [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: function `timeit` is never used [INFO] [stdout] --> src/main.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn timeit T, T>(f: F) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current` is never read [INFO] [stdout] --> src/arrays_strings.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | let mut current = 0; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated functions are never used [INFO] [stdout] --> src/arrays_strings.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 8 | /// https://leetcode.com/problems/product-of-array-except-self/ [INFO] [stdout] 9 | pub fn product_except_self(nums: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn spiral_matrix(matrix: Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn four_sum_count(nums1: Vec, nums2: Vec, nums3: Vec, nums4: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn max_area(height: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | pub fn missing_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | pub fn find_duplicate(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 188 | pub fn first_missing_positive(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 206 | pub fn longest_consecutive_imperative(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 232 | pub fn longest_consecutive_functional(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 244 | pub fn max_sliding_window_functional(nums: Vec, k: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 250 | pub fn max_sliding_window(nums: Vec, k: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 287 | pub fn move_zeroes(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 303 | pub fn move_zeroes_stdlib(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 310 | pub fn remove_duplicates(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 325 | pub fn remove_duplicates_stdlib(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 345 | pub fn single_number_functional(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 351 | pub fn single_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/arrays_strings.rs:207:13 [INFO] [stdout] | [INFO] [stdout] 207 | let mut set: std::collections::HashSet = nums.into_iter().collect(); [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: struct `Utils` is never constructed [INFO] [stdout] --> src/utils.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Utils {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `transpose` is never used [INFO] [stdout] --> src/utils.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl Utils { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 6 | pub fn transpose(v: VecDeque>) -> VecDeque> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `timeit` is never used [INFO] [stdout] --> src/main.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn timeit T, T>(f: F) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated functions are never used [INFO] [stdout] --> src/arrays_strings.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 8 | /// https://leetcode.com/problems/product-of-array-except-self/ [INFO] [stdout] 9 | pub fn product_except_self(nums: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn spiral_matrix(matrix: Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn four_sum_count(nums1: Vec, nums2: Vec, nums3: Vec, nums4: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 77 | pub fn max_area(height: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | pub fn missing_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | pub fn find_duplicate(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 188 | pub fn first_missing_positive(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 206 | pub fn longest_consecutive_imperative(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 232 | pub fn longest_consecutive_functional(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 244 | pub fn max_sliding_window_functional(nums: Vec, k: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 250 | pub fn max_sliding_window(nums: Vec, k: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 287 | pub fn move_zeroes(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 303 | pub fn move_zeroes_stdlib(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 310 | pub fn remove_duplicates(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 325 | pub fn remove_duplicates_stdlib(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 345 | pub fn single_number_functional(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 351 | pub fn single_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Utils` is never constructed [INFO] [stdout] --> src/utils.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Utils {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `transpose` is never used [INFO] [stdout] --> src/utils.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl Utils { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 6 | pub fn transpose(v: VecDeque>) -> VecDeque> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.48s [INFO] running `Command { std: "docker" "inspect" "2dc8598b11775e5f1e854af24f3631eb4afb2b71f4cede01d3c5dcf78e76c6e9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2dc8598b11775e5f1e854af24f3631eb4afb2b71f4cede01d3c5dcf78e76c6e9", kill_on_drop: false }` [INFO] [stdout] 2dc8598b11775e5f1e854af24f3631eb4afb2b71f4cede01d3c5dcf78e76c6e9