[INFO] cloning repository https://github.com/calamarte/leetcode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/calamarte/leetcode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcalamarte%2Fleetcode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcalamarte%2Fleetcode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ea98a0980d1332b1c73069a9b093a6ebd0889c30 [INFO] building calamarte/leetcode 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%2Fcalamarte%2Fleetcode" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/calamarte/leetcode 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/calamarte/leetcode [INFO] finished tweaking git repo https://github.com/calamarte/leetcode [INFO] tweaked toml for git repo https://github.com/calamarte/leetcode written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/calamarte/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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 744783c94933db651727766d89ffcf0530d691ec3a96926a01163da995f7137c [INFO] running `Command { std: "docker" "start" "-a" "744783c94933db651727766d89ffcf0530d691ec3a96926a01163da995f7137c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "744783c94933db651727766d89ffcf0530d691ec3a96926a01163da995f7137c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "744783c94933db651727766d89ffcf0530d691ec3a96926a01163da995f7137c", kill_on_drop: false }` [INFO] [stdout] 744783c94933db651727766d89ffcf0530d691ec3a96926a01163da995f7137c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 199fdb42327583c7acfd04795aa7ba5349db556ae5ad2bd86b5943795d939637 [INFO] running `Command { std: "docker" "start" "-a" "199fdb42327583c7acfd04795aa7ba5349db556ae5ad2bd86b5943795d939637", kill_on_drop: false }` [INFO] [stderr] Compiling leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: struct `BSTIteratorStack` is never constructed [INFO] [stdout] --> src/bt-iterator.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | struct BSTIteratorStack { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `next`, and `has_next` are never used [INFO] [stdout] --> src/bt-iterator.rs:61:8 [INFO] [stdout] | [INFO] [stdout] 60 | impl BSTIteratorStack { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 61 | fn new(mut root: Option>>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | fn next(&mut self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | fn has_next(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread::current` [INFO] [stdout] --> src/candy.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{i32, thread::current}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> src/inorder-postorder-tree.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, collections::HashMap, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/product-array.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let nums = vec![1, 2, 3, 4]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ratings` [INFO] [stdout] --> src/candy.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let ratings = vec![1, 0, 2]; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ratings` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ratings` [INFO] [stdout] --> src/candy.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let ratings = vec![1, 2, 2]; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ratings` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/candy.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | fn candy(mut ratings: Vec) -> i32 { [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 `is_anagram` is never used [INFO] [stdout] --> src/anagram.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn is_anagram(s: String, t: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::VecDeque` [INFO] [stdout] --> src/same-tree.rs:1:42 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{borrow::Borrow, cell::RefCell, collections::VecDeque, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rotate` is never used [INFO] [stdout] --> src/rotate-image.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn rotate(matrix: &mut Vec>) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Borrow` [INFO] [stdout] --> src/same-tree.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{borrow::Borrow, cell::RefCell, collections::VecDeque, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_same_tree_rust` is never used [INFO] [stdout] --> src/same-tree.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn is_same_tree_rust(p: Option>>, q: Option>>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pop`, `top`, and `get_min` are never used [INFO] [stdout] --> src/min-stack.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl MinStack { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 42 | fn pop(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn top(&self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | fn get_min(&self) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `days` [INFO] [stdout] --> src/best-buy-2.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | let mut days = prices.len(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_days` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/best-buy-2.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut days = prices.len(); [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 `max_depth` is never used [INFO] [stdout] --> src/max-depth-bt.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn max_depth(root: Option>>) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `max_depth_rec` is never used [INFO] [stdout] --> src/max-depth-bt.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn max_depth_rec(root: Option>>, deep: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `max_depth_int_dfs` is never used [INFO] [stdout] --> src/max-depth-bt.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn max_depth_int_dfs(root: Option>>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::usize` [INFO] [stdout] --> src/jump-game.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::successors` [INFO] [stdout] --> src/remove-node-end.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::iter::successors; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `iter::once` [INFO] [stdout] --> src/jump-game-2.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cmp::max, iter::once, usize}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LinkedList`, `borrow::BorrowMut`, `cell::RefCell`, and `rc::Rc` [INFO] [stdout] --> src/lru-cache.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | borrow::BorrowMut, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 3 | cell::RefCell, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 4 | collections::{HashMap, LinkedList, VecDeque}, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 5 | rc::Rc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/jump-game-2.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let nums = vec![2, 3, 1, 1, 4]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/jump-game-2.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let nums = vec![2, 3, 0, 1, 4]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/jump-game-2.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let nums = vec![1, 2]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LRUCache` is never constructed [INFO] [stdout] --> src/lru-cache.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct LRUCache { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LRUCache` has a derived impl for the trait `Default`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get`, `put`, and `update_key` are never used [INFO] [stdout] --> src/lru-cache.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 20 | impl LRUCache { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 21 | fn new(capacity: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn get(&mut self, key: i32) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | fn put(&mut self, key: i32, value: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | fn update_key(&mut self, key: i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `words` [INFO] [stdout] --> src/justify.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let words: Vec = vec![ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_words` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/main.rs:9:62 [INFO] [stdout] | [INFO] [stdout] 9 | fn merge(nums1: &mut Vec, m: i32, nums2: &mut Vec, n: i32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tank` [INFO] [stdout] --> src/gas-station.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let mut tank = 0; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_tank` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/gas-station.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let mut tank = 0; [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 `can_complete_circuit` is never used [INFO] [stdout] --> src/gas-station.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn can_complete_circuit(gas: Vec, cost: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/contains-duplicate-2.rs:2:19 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{HashMap, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/min-size-sub-sum.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp`, `collections::VecDeque`, and `ops::AddAssign` [INFO] [stdout] --> src/min-size-sub-sum.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{cmp, collections::VecDeque, i32, ops::AddAssign, usize}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target` [INFO] [stdout] --> src/min-size-sub-sum.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | let (target, nums) = (7, vec![2, 3, 1, 2, 4, 3]); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_target` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/min-size-sub-sum.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | let (target, nums) = (7, vec![2, 3, 1, 2, 4, 3]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Duplicates` is never used [INFO] [stdout] --> src/contains-duplicate-2.rs:41:7 [INFO] [stdout] | [INFO] [stdout] 41 | trait Duplicates { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_sum` is never used [INFO] [stdout] --> src/two-sum.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn two_sum(nums: Vec, target: i32) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_palindrome` is never used [INFO] [stdout] --> src/valid-palindrome.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn is_palindrome(s: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet`, `ops::Sub`, `os::unix::raw::uid_t`, and `usize` [INFO] [stdout] --> src/sub-concat-words.rs:3:28 [INFO] [stdout] | [INFO] [stdout] 3 | collections::{HashMap, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 4 | ops::Sub, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 5 | os::unix::raw::uid_t, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated type alias `std::os::unix::raw::uid_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/sub-concat-words.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | os::unix::raw::uid_t, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> src/int-roman.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let num = 3749; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/remove-duplicates.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/remove-duplicates.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | collections::{BTreeSet, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates` is never used [INFO] [stdout] --> src/remove-duplicates.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn remove_duplicates(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `skip` is never used [INFO] [stdout] --> src/remove-duplicates.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn skip<'a>(value: i32, iter: &mut Peekable>) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates_ez` is never used [INFO] [stdout] --> src/remove-duplicates.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn remove_duplicates_ez(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates_traditional` is never used [INFO] [stdout] --> src/remove-duplicates.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn remove_duplicates_traditional(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/roman-int.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let s = String::from("III"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/roman-int.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s = String::from("LVIII"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BTreeSet`, `HashMap`, and `ops::Deref` [INFO] [stdout] --> src/rain-water.rs:2:19 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{BTreeSet, HashMap, VecDeque}, [INFO] [stdout] | ^^^^^^^^ ^^^^^^^ [INFO] [stdout] 3 | ops::Deref, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `draw_water` is never used [INFO] [stdout] --> src/rain-water.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 67 | trait Graph { [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 68 | fn draw(&self); [INFO] [stdout] 69 | fn draw_water(&self, water: &Vec<(i32, i32)>); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `search_rust` is never used [INFO] [stdout] --> src/search-rotate.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn search_rust(nums: Vec, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `remove` is never used [INFO] [stdout] --> src/insert-delete-random.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 18 | impl RandomizedSet { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 29 | fn remove(&mut self, val: i32) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_happy` is never used [INFO] [stdout] --> src/happy-number.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn is_happy(mut n: i32) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.61s [INFO] running `Command { std: "docker" "inspect" "199fdb42327583c7acfd04795aa7ba5349db556ae5ad2bd86b5943795d939637", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "199fdb42327583c7acfd04795aa7ba5349db556ae5ad2bd86b5943795d939637", kill_on_drop: false }` [INFO] [stdout] 199fdb42327583c7acfd04795aa7ba5349db556ae5ad2bd86b5943795d939637 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] d6b04cd377879dcc5430b4213e5de39fcdc1e414523273ffaf792c661ab24abd [INFO] running `Command { std: "docker" "start" "-a" "d6b04cd377879dcc5430b4213e5de39fcdc1e414523273ffaf792c661ab24abd", kill_on_drop: false }` [INFO] [stderr] Compiling leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `collections::VecDeque` [INFO] [stdout] --> src/same-tree.rs:1:42 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{borrow::Borrow, cell::RefCell, collections::VecDeque, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Borrow` [INFO] [stdout] --> src/same-tree.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{borrow::Borrow, cell::RefCell, collections::VecDeque, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/min-size-sub-sum.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp`, `collections::VecDeque`, and `ops::AddAssign` [INFO] [stdout] --> src/min-size-sub-sum.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{cmp, collections::VecDeque, i32, ops::AddAssign, usize}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/product-array.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let nums = vec![1, 2, 3, 4]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target` [INFO] [stdout] --> src/min-size-sub-sum.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | let (target, nums) = (7, vec![2, 3, 1, 2, 4, 3]); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_target` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_same_tree_rust` is never used [INFO] [stdout] --> src/same-tree.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn is_same_tree_rust(p: Option>>, q: Option>>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/min-size-sub-sum.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | let (target, nums) = (7, vec![2, 3, 1, 2, 4, 3]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `words` [INFO] [stdout] --> src/justify.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let words: Vec = vec![ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_words` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_palindrome` is never used [INFO] [stdout] --> src/valid-palindrome.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn is_palindrome(s: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_anagram` is never used [INFO] [stdout] --> src/anagram.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn is_anagram(s: String, t: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_sum` is never used [INFO] [stdout] --> src/two-sum.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn two_sum(nums: Vec, target: i32) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::successors` [INFO] [stdout] --> src/remove-node-end.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::iter::successors; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LinkedList`, `borrow::BorrowMut`, `cell::RefCell`, and `rc::Rc` [INFO] [stdout] --> src/lru-cache.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | borrow::BorrowMut, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 3 | cell::RefCell, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 4 | collections::{HashMap, LinkedList, VecDeque}, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 5 | rc::Rc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LRUCache` is never constructed [INFO] [stdout] --> src/lru-cache.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct LRUCache { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LRUCache` has a derived impl for the trait `Default`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get`, `put`, and `update_key` are never used [INFO] [stdout] --> src/lru-cache.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 20 | impl LRUCache { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 21 | fn new(capacity: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn get(&mut self, key: i32) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | fn put(&mut self, key: i32, value: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | fn update_key(&mut self, key: i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread::current` [INFO] [stdout] --> src/candy.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{i32, thread::current}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ratings` [INFO] [stdout] --> src/candy.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let ratings = vec![1, 0, 2]; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ratings` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ratings` [INFO] [stdout] --> src/candy.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let ratings = vec![1, 2, 2]; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ratings` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/candy.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | fn candy(mut ratings: Vec) -> i32 { [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: `num` [INFO] [stdout] --> src/int-roman.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let num = 3749; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rotate` is never used [INFO] [stdout] --> src/rotate-image.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn rotate(matrix: &mut Vec>) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `remove` is never used [INFO] [stdout] --> src/insert-delete-random.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 18 | impl RandomizedSet { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 29 | fn remove(&mut self, val: i32) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `iter::once` [INFO] [stdout] --> src/jump-game-2.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cmp::max, iter::once, usize}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet`, `ops::Sub`, `os::unix::raw::uid_t`, and `usize` [INFO] [stdout] --> src/sub-concat-words.rs:3:28 [INFO] [stdout] | [INFO] [stdout] 3 | collections::{HashMap, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 4 | ops::Sub, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 5 | os::unix::raw::uid_t, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/jump-game-2.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let nums = vec![2, 3, 1, 1, 4]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/jump-game-2.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let nums = vec![2, 3, 0, 1, 4]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/jump-game-2.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let nums = vec![1, 2]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated type alias `std::os::unix::raw::uid_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/sub-concat-words.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | os::unix::raw::uid_t, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BSTIteratorStack` is never constructed [INFO] [stdout] --> src/bt-iterator.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | struct BSTIteratorStack { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `next`, and `has_next` are never used [INFO] [stdout] --> src/bt-iterator.rs:61:8 [INFO] [stdout] | [INFO] [stdout] 60 | impl BSTIteratorStack { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 61 | fn new(mut root: Option>>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | fn next(&mut self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | fn has_next(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::usize` [INFO] [stdout] --> src/jump-game.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/roman-int.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let s = String::from("III"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/roman-int.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s = String::from("LVIII"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `days` [INFO] [stdout] --> src/best-buy-2.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | let mut days = prices.len(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_days` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_happy` is never used [INFO] [stdout] --> src/happy-number.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn is_happy(mut n: i32) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/best-buy-2.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut days = prices.len(); [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 import: `core::num` [INFO] [stdout] --> src/remove-duplicates.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/main.rs:9:62 [INFO] [stdout] | [INFO] [stdout] 9 | fn merge(nums1: &mut Vec, m: i32, nums2: &mut Vec, n: i32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/remove-duplicates.rs:3:29 [INFO] [stdout] | [INFO] [stdout] 3 | collections::{BTreeSet, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pop`, `top`, and `get_min` are never used [INFO] [stdout] --> src/min-stack.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl MinStack { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 42 | fn pop(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn top(&self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | fn get_min(&self) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> src/inorder-postorder-tree.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{cell::RefCell, collections::HashMap, rc::Rc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates` is never used [INFO] [stdout] --> src/remove-duplicates.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn remove_duplicates(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `skip` is never used [INFO] [stdout] --> src/remove-duplicates.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn skip<'a>(value: i32, iter: &mut Peekable>) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates_ez` is never used [INFO] [stdout] --> src/remove-duplicates.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn remove_duplicates_ez(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates_traditional` is never used [INFO] [stdout] --> src/remove-duplicates.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn remove_duplicates_traditional(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BTreeSet`, `HashMap`, and `ops::Deref` [INFO] [stdout] --> src/rain-water.rs:2:19 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{BTreeSet, HashMap, VecDeque}, [INFO] [stdout] | ^^^^^^^^ ^^^^^^^ [INFO] [stdout] 3 | ops::Deref, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tank` [INFO] [stdout] --> src/gas-station.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let mut tank = 0; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_tank` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/gas-station.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let mut tank = 0; [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 `can_complete_circuit` is never used [INFO] [stdout] --> src/gas-station.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn can_complete_circuit(gas: Vec, cost: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `draw_water` is never used [INFO] [stdout] --> src/rain-water.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 67 | trait Graph { [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 68 | fn draw(&self); [INFO] [stdout] 69 | fn draw_water(&self, water: &Vec<(i32, i32)>); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/contains-duplicate-2.rs:2:19 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{HashMap, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Duplicates` is never used [INFO] [stdout] --> src/contains-duplicate-2.rs:41:7 [INFO] [stdout] | [INFO] [stdout] 41 | trait Duplicates { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `search_rust` is never used [INFO] [stdout] --> src/search-rotate.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn search_rust(nums: Vec, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `max_depth` is never used [INFO] [stdout] --> src/max-depth-bt.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn max_depth(root: Option>>) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `max_depth_rec` is never used [INFO] [stdout] --> src/max-depth-bt.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn max_depth_rec(root: Option>>, deep: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `max_depth_int_dfs` is never used [INFO] [stdout] --> src/max-depth-bt.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn max_depth_int_dfs(root: Option>>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 2.93s [INFO] running `Command { std: "docker" "inspect" "d6b04cd377879dcc5430b4213e5de39fcdc1e414523273ffaf792c661ab24abd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d6b04cd377879dcc5430b4213e5de39fcdc1e414523273ffaf792c661ab24abd", kill_on_drop: false }` [INFO] [stdout] d6b04cd377879dcc5430b4213e5de39fcdc1e414523273ffaf792c661ab24abd