[INFO] cloning repository https://github.com/giorgeabdala/RustPolkadotChallenges [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/giorgeabdala/RustPolkadotChallenges" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgiorgeabdala%2FRustPolkadotChallenges", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgiorgeabdala%2FRustPolkadotChallenges'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1e391bc4f885f7d1cc9b28eded72da415a979090 [INFO] checking giorgeabdala/RustPolkadotChallenges against try#8d46be77cd48fdbcced888d027457e2c9cf2aa16 for pr-142723 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgiorgeabdala%2FRustPolkadotChallenges" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/giorgeabdala/RustPolkadotChallenges on toolchain 8d46be77cd48fdbcced888d027457e2c9cf2aa16 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8d46be77cd48fdbcced888d027457e2c9cf2aa16" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/giorgeabdala/RustPolkadotChallenges [INFO] finished tweaking git repo https://github.com/giorgeabdala/RustPolkadotChallenges [INFO] tweaked toml for git repo https://github.com/giorgeabdala/RustPolkadotChallenges written to /workspace/builds/worker-7-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/giorgeabdala/RustPolkadotChallenges 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" "+8d46be77cd48fdbcced888d027457e2c9cf2aa16" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8d46be77cd48fdbcced888d027457e2c9cf2aa16" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 718ef667d3c298b20dca4fc634e42e8542f79dca7bcdf50362e45d26728320f6 [INFO] running `Command { std: "docker" "start" "-a" "718ef667d3c298b20dca4fc634e42e8542f79dca7bcdf50362e45d26728320f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "718ef667d3c298b20dca4fc634e42e8542f79dca7bcdf50362e45d26728320f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "718ef667d3c298b20dca4fc634e42e8542f79dca7bcdf50362e45d26728320f6", kill_on_drop: false }` [INFO] [stdout] 718ef667d3c298b20dca4fc634e42e8542f79dca7bcdf50362e45d26728320f6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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" "-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8d46be77cd48fdbcced888d027457e2c9cf2aa16" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bea39907dda76f4f36e10a3b98bbe395470fe6dfeb9ee1ed72ec50e1e1e62797 [INFO] running `Command { std: "docker" "start" "-a" "bea39907dda76f4f36e10a3b98bbe395470fe6dfeb9ee1ed72ec50e1e1e62797", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling hashbrown v0.15.4 [INFO] [stderr] Compiling rustversion v1.0.21 [INFO] [stderr] Compiling equivalent v1.0.2 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Compiling winnow v0.7.10 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling unicode-xid v0.2.6 [INFO] [stderr] Checking byte-slice-cast v1.2.3 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling indexmap v2.9.0 [INFO] [stderr] Compiling parity-scale-codec v3.7.5 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Compiling const_format_proc_macros v0.2.34 [INFO] [stderr] Checking const_format v0.2.34 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Compiling proc-macro-crate v3.3.0 [INFO] [stderr] Compiling derive_more-impl v1.0.0 [INFO] [stderr] Compiling impl-trait-for-tuples v0.2.3 [INFO] [stderr] Compiling parity-scale-codec-derive v3.7.5 [INFO] [stderr] Checking derive_more v1.0.0 [INFO] [stderr] Checking scale-info v2.11.6 [INFO] [stderr] Checking exercicios v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/beginner/challenge_01.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/beginner/challenge_02.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/beginner/challenge_03.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `TextAnalyzer`, `first_word`, and `longest` [INFO] [stdout] --> src/beginner/challenge_08.rs:34:41 [INFO] [stdout] | [INFO] [stdout] 34 | use crate::beginner::challenge_08::{first_word, longest, TextAnalyzer}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `KeyValueStorage`, `StorageMap`, and `Storage` [INFO] [stdout] --> src/medium/challenge_02.rs:97:39 [INFO] [stdout] | [INFO] [stdout] 97 | use crate::medium::challenge_02::{KeyValueStorage, Storage, StorageMap}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::task::Context` [INFO] [stdout] --> src/advanced/challenge_02.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::task::Context; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::task::Context` [INFO] [stdout] --> src/advanced/challenge_02.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::task::Context; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Player` is never constructed [INFO] [stdout] --> src/beginner/challenge_01.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Player { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_score`, `get_info`, and `reset_score` are never used [INFO] [stdout] --> src/beginner/challenge_01.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Player { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 11 | fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | fn add_score(&mut self, points: u32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn get_info(&self) -> String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | fn reset_score(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `transfer_player` is never used [INFO] [stdout] --> src/beginner/challenge_01.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn transfer_player(player: Player) -> Player { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `clone_player` is never used [INFO] [stdout] --> src/beginner/challenge_01.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn clone_player(player: &Player) -> Player { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Book` is never constructed [INFO] [stdout] --> src/beginner/challenge_02.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Book { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/beginner/challenge_02.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Book { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 9 | fn new(title: String) -> Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Library` is never constructed [INFO] [stdout] --> src/beginner/challenge_02.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct Library { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_book`, `find_book`, `borrow_book`, and `return_book` are never used [INFO] [stdout] --> src/beginner/challenge_02.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 18 | impl Library { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 19 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | fn add_book(&mut self, book: Book) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn find_book(&self, title: &str) -> Option<&Book> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | fn borrow_book(&mut self, title: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | fn return_book(&mut self, title: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/beginner/challenge_03.rs:4:6 [INFO] [stdout] | [INFO] [stdout] 4 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Color` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Message` is never used [INFO] [stdout] --> src/beginner/challenge_03.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum Message { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `describe_color` is never used [INFO] [stdout] --> src/beginner/challenge_03.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn describe_color(color: Color) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_message` is never used [INFO] [stdout] --> src/beginner/challenge_03.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn process_message(msg: Message) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Contact` is never constructed [INFO] [stdout] --> src/beginner/challenge_04.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Contact { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Contact` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ContactBook` is never constructed [INFO] [stdout] --> src/beginner/challenge_04.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct ContactBook { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `set_email`, and `set_phone` are never used [INFO] [stdout] --> src/beginner/challenge_04.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 15 | impl Contact { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 16 | [INFO] [stdout] 17 | fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | fn set_email(&mut self, email: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | fn set_phone(&mut self, phone: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_contact`, `find_contact`, and `get_email` are never used [INFO] [stdout] --> src/beginner/challenge_04.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 31 | impl ContactBook { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 32 | [INFO] [stdout] 33 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | fn add_contact(&mut self, contact: Contact) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn find_contact(&self, name: &str) -> Option<&Contact> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn get_email(&self, name: &str) -> Option<&String> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `OutOfRange` is never constructed [INFO] [stdout] --> src/beginner/challenge_05.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 4 | enum SimpleError { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] 5 | InvalidInput, [INFO] [stdout] 6 | OutOfRange [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SimpleError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `safe_divide` is never used [INFO] [stdout] --> src/beginner/challenge_05.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn safe_divide(a: i32, b:i32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_positive` is never used [INFO] [stdout] --> src/beginner/challenge_05.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn parse_positive(s: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_average` is never used [INFO] [stdout] --> src/beginner/challenge_05.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn calculate_average(numbers: &[&str]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest` is never used [INFO] [stdout] --> src/beginner/challenge_08.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> src/beginner/challenge_08.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn first_word<'a>(s: &'a str) -> &'a str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TextAnalyzer` is never constructed [INFO] [stdout] --> src/beginner/challenge_08.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | struct TextAnalyzer<'a> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `word_count`, and `get_text` are never used [INFO] [stdout] --> src/beginner/challenge_08.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 16 | impl<'a> TextAnalyzer<'a> { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 17 | fn new(text: &'a str) -> TextAnalyzer<'a> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | fn word_count(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | fn get_text(&self) -> &'a str { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Summable` is never used [INFO] [stdout] --> src/beginner/challenge_07.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Summable { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Store` is never constructed [INFO] [stdout] --> src/beginner/challenge_07.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct Store { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Store` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/beginner/challenge_07.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl + Copy> Store { [INFO] [stdout] | ------------------------------------------------ associated function in this implementation [INFO] [stdout] 14 | pub fn new(v: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/beginner/challenge_07.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `User` is never constructed [INFO] [stdout] --> src/medium/challenge_01.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct User { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `User` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/medium/challenge_01.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl User { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 12 | fn new(id: u32, username: String, email: String, roles: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserManager` is never constructed [INFO] [stdout] --> src/medium/challenge_01.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct UserManager { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/medium/challenge_01.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl UserManager { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 25 | [INFO] [stdout] 26 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn add_user(&mut self, user: User) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | fn get_user(&self, id: u32) -> Option<&User> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | fn find_by_username(&self, username: &str) -> Option<&User> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | fn get_users_by_role(&self, role: &str) -> Vec<&User> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 62 | fn start_session(&mut self, user_id: u32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | fn end_session(&mut self, user_id: u32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | fn get_active_users(&self) -> Vec<&User> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | fn get_sorted_usernames(&self) -> Vec<&String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Storable` is never used [INFO] [stdout] --> src/medium/challenge_02.rs:3:7 [INFO] [stdout] | [INFO] [stdout] 3 | trait Storable { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Storage` is never constructed [INFO] [stdout] --> src/medium/challenge_02.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct Storage where T: Storable + Clone{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `store`, `retrieve`, `len`, and `is_full` are never used [INFO] [stdout] --> src/medium/challenge_02.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 18 | impl Storage { [INFO] [stdout] | ------------------------------------ associated items in this implementation [INFO] [stdout] 19 | fn new(capacity: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | fn store(&mut self, item: T) -> Result { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | fn retrieve(&self, index: usize) -> Option<&T> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | fn is_full(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StorageMap` is never used [INFO] [stdout] --> src/medium/challenge_02.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | trait StorageMap { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `KeyValueStorage` is never constructed [INFO] [stdout] --> src/medium/challenge_02.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct KeyValueStorage { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/medium/challenge_02.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 55 | impl KeyValueStorage { [INFO] [stdout] | -------------------------------- associated function in this implementation [INFO] [stdout] 56 | fn new() -> Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Weight` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Weight { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Weight` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `from_parts` and `zero` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Weight { [INFO] [stdout] | ----------- associated functions in this implementation [INFO] [stdout] 12 | pub fn from_parts(ref_time: u64, proof_size: u64) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn zero() -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `WeightInfo` is never used [INFO] [stdout] --> src/advanced/challenge_02.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | pub trait WeightInfo { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BenchmarkWeights` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct BenchmarkWeights; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Config` is never used [INFO] [stdout] --> src/advanced/challenge_02.rs:52:11 [INFO] [stdout] | [INFO] [stdout] 52 | pub trait Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pallet` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub struct Pallet { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `create_item`, `update_item`, and `batch_delete` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 62 | impl Pallet { [INFO] [stdout] | -------------------------- methods in this implementation [INFO] [stdout] 63 | [INFO] [stdout] 64 | pub fn create_item(&mut self, content: String) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn update_item(&mut self, id: u32, new_content: String) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn batch_delete(&mut self, ids: Vec) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FeeCalculator` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:95:12 [INFO] [stdout] | [INFO] [stdout] 95 | pub struct FeeCalculator { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `calculate_fee` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 100 | impl FeeCalculator { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 101 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn calculate_fee(&self, weight: Weight) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WeightMeter` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:115:12 [INFO] [stdout] | [INFO] [stdout] 115 | pub struct WeightMeter { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `consume`, and `remaining` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 120 | impl WeightMeter { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 121 | pub fn new(limit: Weight) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | pub fn consume(&mut self, weight: Weight) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 140 | pub fn remaining(&self) -> Weight { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/medium/challenge_01.rs:172:13 [INFO] [stdout] | [INFO] [stdout] 172 | let mut users = manager.get_users_by_role(&role.clone()); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/medium/challenge_01.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | let mut users = manager.get_users_by_role("role non existent"); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/medium/challenge_01.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | let mut usernames = manager.get_sorted_usernames(); [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/advanced/challenge_02.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | Err(e) => panic!("Failed to create item") [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/advanced/challenge_02.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | Err(e) => panic!("Failed to create item") [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/beginner/challenge_07.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `to_bytes`, `from_bytes`, and `storage_key` are never used [INFO] [stdout] --> src/medium/challenge_02.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 3 | trait Storable { [INFO] [stdout] | -------- associated items in this trait [INFO] [stdout] 4 | [INFO] [stdout] 5 | fn to_bytes(&self) -> Vec ; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 6 | [INFO] [stdout] 7 | fn from_bytes(data: &[u8]) -> Result where Self: Sized ; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 8 | [INFO] [stdout] 9 | fn storage_key(&self) -> String { "default".to_string() } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `zero` is never used [INFO] [stdout] --> src/advanced/challenge_02.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Weight { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn zero() -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `update_item`, `delete_item`, and `batch_operation` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 21 | pub trait WeightInfo { [INFO] [stdout] | ---------- associated functions in this trait [INFO] [stdout] 22 | fn create_item() -> Weight; [INFO] [stdout] 23 | fn update_item() -> Weight; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 24 | fn delete_item() -> Weight; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 25 | fn batch_operation(n: u32) -> Weight; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `update_item` and `batch_delete` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 62 | impl Pallet { [INFO] [stdout] | -------------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn update_item(&mut self, id: u32, new_content: String) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn batch_delete(&mut self, ids: Vec) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FeeCalculator` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:95:12 [INFO] [stdout] | [INFO] [stdout] 95 | pub struct FeeCalculator { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `calculate_fee` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 100 | impl FeeCalculator { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 101 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn calculate_fee(&self, weight: Weight) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WeightMeter` is never constructed [INFO] [stdout] --> src/advanced/challenge_02.rs:115:12 [INFO] [stdout] | [INFO] [stdout] 115 | pub struct WeightMeter { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `consume`, and `remaining` are never used [INFO] [stdout] --> src/advanced/challenge_02.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 120 | impl WeightMeter { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 121 | pub fn new(limit: Weight) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | pub fn consume(&mut self, weight: Weight) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 140 | pub fn remaining(&self) -> Weight { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_benchmark_weights_create_item_returns_correct_weight` is never used [INFO] [stdout] --> src/advanced/challenge_02.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | fn test_benchmark_weights_create_item_returns_correct_weight() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.26s [INFO] running `Command { std: "docker" "inspect" "bea39907dda76f4f36e10a3b98bbe395470fe6dfeb9ee1ed72ec50e1e1e62797", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bea39907dda76f4f36e10a3b98bbe395470fe6dfeb9ee1ed72ec50e1e1e62797", kill_on_drop: false }` [INFO] [stdout] bea39907dda76f4f36e10a3b98bbe395470fe6dfeb9ee1ed72ec50e1e1e62797