[INFO] cloning repository https://github.com/sunxingboo/rust-design-pattern [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/sunxingboo/rust-design-pattern" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsunxingboo%2Frust-design-pattern", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsunxingboo%2Frust-design-pattern'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 95fc1ffb7c9fb38efc2d93bd2b983d5d083b081d [INFO] testing sunxingboo/rust-design-pattern against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_with_libc_patch_0 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsunxingboo%2Frust-design-pattern" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/sunxingboo/rust-design-pattern [INFO] finished tweaking git repo https://github.com/sunxingboo/rust-design-pattern [INFO] tweaked toml for git repo https://github.com/sunxingboo/rust-design-pattern written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/sunxingboo/rust-design-pattern on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/sunxingboo/rust-design-pattern 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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0a18b68e5e1363ebff15bd7594365ee9e5e41d17c049fc13d1f45abf0c3b4ecb [INFO] running `Command { std: "docker" "start" "-a" "0a18b68e5e1363ebff15bd7594365ee9e5e41d17c049fc13d1f45abf0c3b4ecb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0a18b68e5e1363ebff15bd7594365ee9e5e41d17c049fc13d1f45abf0c3b4ecb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0a18b68e5e1363ebff15bd7594365ee9e5e41d17c049fc13d1f45abf0c3b4ecb", kill_on_drop: false }` [INFO] [stdout] 0a18b68e5e1363ebff15bd7594365ee9e5e41d17c049fc13d1f45abf0c3b4ecb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 67ed52f2f084e905b4235e1852ebe5097fd7f8b108c32b5d4471b62a8d07b3ac [INFO] running `Command { std: "docker" "start" "-a" "67ed52f2f084e905b4235e1852ebe5097fd7f8b108c32b5d4471b62a8d07b3ac", kill_on_drop: false }` [INFO] [stderr] Compiling design-pattern v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/simple_factory/factory.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(flag: &str) -> Box { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Animal` is never used [INFO] [stdout] --> src/patterns/creational/factory/simple_factory/product/base.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Animal { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/simple_factory/product/product_cat.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Cat { [INFO] [stdout] | --- field in this struct [INFO] [stdout] 5 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/simple_factory/product/product_cat.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Cat { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/simple_factory/product/product_dog.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Dog { [INFO] [stdout] | --- field in this struct [INFO] [stdout] 5 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/simple_factory/product/product_dog.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Dog { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Factory` is never used [INFO] [stdout] --> src/patterns/creational/factory/factory_method/factory/base.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | pub trait Factory { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CatFactory` is never constructed [INFO] [stdout] --> src/patterns/creational/factory/factory_method/factory/factory_cat.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CatFactory {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DogFactory` is never constructed [INFO] [stdout] --> src/patterns/creational/factory/factory_method/factory/factory_dog.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct DogFactory {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Animal` is never used [INFO] [stdout] --> src/patterns/creational/factory/factory_method/product/base.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Animal { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/factory_method/product/product_cat.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Cat { [INFO] [stdout] | --- field in this struct [INFO] [stdout] 5 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/factory_method/product/product_cat.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Cat { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/factory_method/product/product_dog.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Dog { [INFO] [stdout] | --- field in this struct [INFO] [stdout] 5 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/factory_method/product/product_dog.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Dog { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Factory` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/factory/base.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Factory { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `BritishShorthairCat` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/base.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait BritishShorthairCat { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `PastoralCat` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/base.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | pub trait PastoralCat { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_british_shor_hair_cat.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct BlueWhiteCat { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] 6 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_british_shor_hair_cat.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl BlueWhiteCat { [INFO] [stdout] | ----------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_british_shor_hair_cat.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct FelinaeCat { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 26 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_british_shor_hair_cat.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl FelinaeCat { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 30 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_pastoral_cat.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct GingerCat { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 6 | name: String [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_pastoral_cat.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl GingerCat { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_pastoral_cat.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct CalicoCat { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 26 | name: String [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/factory/abstract_factory/product/product_pastoral_cat.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl CalicoCat { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 30 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Director` is never constructed [INFO] [stdout] --> src/patterns/creational/builder/director.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Director { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get_builder`, and `build` are never used [INFO] [stdout] --> src/patterns/creational/builder/director.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Director { [INFO] [stdout] | ----------------------------- associated items in this implementation [INFO] [stdout] 9 | // 引导器构造函数 [INFO] [stdout] 10 | pub fn new(builder: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn get_builder(&self) -> &T { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn build(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Builder` is never used [INFO] [stdout] --> src/patterns/creational/builder/builder/base.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Builder { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `product` is never read [INFO] [stdout] --> src/patterns/creational/builder/builder/builder_blue_white_cat.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct BlueWhiteCatBuilder { [INFO] [stdout] | ------------------- field in this struct [INFO] [stdout] 6 | product: BlueWhiteCat, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_result` are never used [INFO] [stdout] --> src/patterns/creational/builder/builder/builder_blue_white_cat.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl BlueWhiteCatBuilder { [INFO] [stdout] | ------------------------ associated items in this implementation [INFO] [stdout] 10 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn get_result(&self) -> &BlueWhiteCat { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `product` is never read [INFO] [stdout] --> src/patterns/creational/builder/builder/builder_felinae_cat.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct FelinaeCatBuilder { [INFO] [stdout] | ----------------- field in this struct [INFO] [stdout] 7 | product: FelinaeCat, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_result` are never used [INFO] [stdout] --> src/patterns/creational/builder/builder/builder_felinae_cat.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl FelinaeCatBuilder { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 11 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn get_result(&self) -> &FelinaeCat { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `age`, and `color` are never read [INFO] [stdout] --> src/patterns/creational/builder/product/product_blue_white_cat.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct BlueWhiteCat { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 4 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 5 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] 6 | color: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/patterns/creational/builder/product/product_blue_white_cat.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl BlueWhiteCat { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] 10 | // name [INFO] [stdout] 11 | pub fn set_name(&mut self, name: String) -> &mut Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn get_name(&self) -> String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn set_age(&mut self, age: i32) -> &mut Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn get_age(&self) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn set_color(&mut self, color: String) -> &mut Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn get_color(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn say(&self) -> String { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `age`, and `color` are never read [INFO] [stdout] --> src/patterns/creational/builder/product/product_felinae_cat.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct FelinaeCat { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 4 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 5 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] 6 | color: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/patterns/creational/builder/product/product_felinae_cat.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl FelinaeCat { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] 10 | // set name [INFO] [stdout] 11 | pub fn set_name(&mut self, name: String) -> &mut Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn get_name(&self) -> String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn set_age(&mut self, age: i32) -> &mut Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | pub fn get_age(&self) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn set_color(&mut self, color: String) -> &mut Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn get_color(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn say(&self) -> String { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SINGLETON` is never used [INFO] [stdout] --> src/patterns/creational/singleton/singleton_std.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | static mut SINGLETON: Option>> = None; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SingletonStd` is never constructed [INFO] [stdout] --> src/patterns/creational/singleton/singleton_std.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct SingletonStd; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/creational/singleton/singleton_std.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 7 | impl SingletonStd { [INFO] [stdout] | ----------------- associated function in this implementation [INFO] [stdout] 8 | pub unsafe fn new() -> Arc> { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Prototype` is never used [INFO] [stdout] --> src/patterns/creational/prototype/prototype.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Prototype { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/patterns/creational/prototype/concrete_prototype/cat.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Cat { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 6 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 7 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `signature` are never used [INFO] [stdout] --> src/patterns/creational/prototype/concrete_prototype/cat.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Cat { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] 11 | pub fn new(name: String, age: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn signature(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `color` and `hair` are never read [INFO] [stdout] --> src/patterns/creational/prototype/concrete_prototype/dog.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Dog { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 6 | color: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7 | hair: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `signature` are never used [INFO] [stdout] --> src/patterns/creational/prototype/concrete_prototype/dog.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Dog { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] 11 | pub fn new(color: String, hair: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn signature(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Facade` is never used [INFO] [stdout] --> src/patterns/structural/facade/facade.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | pub trait Facade { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hospital` is never constructed [INFO] [stdout] --> src/patterns/structural/facade/facade.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Hospital { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/facade/facade.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 23 | impl Hospital { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 24 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cashier` is never constructed [INFO] [stdout] --> src/patterns/structural/facade/cashier.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Cashier; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `register`, `pay`, and `print_the_ticket` are never used [INFO] [stdout] --> src/patterns/structural/facade/cashier.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | impl Cashier { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 5 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | pub fn register(&self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | pub fn pay(&self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn print_the_ticket(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Doctor` is never constructed [INFO] [stdout] --> src/patterns/structural/facade/doctor.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Doctor; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `diagnosis` are never used [INFO] [stdout] --> src/patterns/structural/facade/doctor.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | impl Doctor { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 5 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | pub fn diagnosis(&self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pharmacy` is never constructed [INFO] [stdout] --> src/patterns/structural/facade/pharmacy.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Pharmacy; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `prescribe_medication` are never used [INFO] [stdout] --> src/patterns/structural/facade/pharmacy.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | impl Pharmacy { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 5 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | pub fn prescribe_medication(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BritishStandardPlugAdapter` is never constructed [INFO] [stdout] --> src/patterns/structural/adapter/adapter.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct BritishStandardPlugAdapter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/adapter/adapter.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl BritishStandardPlugAdapter { [INFO] [stdout] | ------------------------------- associated function in this implementation [INFO] [stdout] 12 | pub fn new(plug: Box) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Plug` is never used [INFO] [stdout] --> src/patterns/structural/adapter/plug.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Plug { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BritishStandardPlug` is never constructed [INFO] [stdout] --> src/patterns/structural/adapter/plug.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct BritishStandardPlug; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/adapter/plug.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl BritishStandardPlug { [INFO] [stdout] | ------------------------ associated function in this implementation [INFO] [stdout] 21 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ProxyAccessor` is never constructed [INFO] [stdout] --> src/patterns/structural/proxy/proxy.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct ProxyAccessor { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/proxy/proxy.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl ProxyAccessor { [INFO] [stdout] | ------------------ associated function in this implementation [INFO] [stdout] 17 | // 可以结合工厂模式生成持有的real对象。这里简单表述不举例实现了。 [INFO] [stdout] 18 | pub fn new(real: Box) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Accessor` is never used [INFO] [stdout] --> src/patterns/structural/proxy/subject.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Accessor { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `GoogleAccessor` is never constructed [INFO] [stdout] --> src/patterns/structural/proxy/subject.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct GoogleAccessor; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/proxy/subject.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl GoogleAccessor { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 15 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `File` is never constructed [INFO] [stdout] --> src/patterns/structural/composite/leaf.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct File { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/composite/leaf.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl File { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 27 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Directory` is never constructed [INFO] [stdout] --> src/patterns/structural/composite/composite.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Directory { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `add` are never used [INFO] [stdout] --> src/patterns/structural/composite/composite.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl Directory { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 30 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | pub fn add(&mut self, c: Box) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Flyweight` is never used [INFO] [stdout] --> src/patterns/structural/flyweight/flyweight.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Flyweight { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FlyweightFactory` is never constructed [INFO] [stdout] --> src/patterns/structural/flyweight/flyweight_factory.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct FlyweightFactory { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_flyweight` are never used [INFO] [stdout] --> src/patterns/structural/flyweight/flyweight_factory.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl FlyweightFactory { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 11 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn get_flyweight(&mut self, key: &str) -> Rc { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteFlyweightOne` is never constructed [INFO] [stdout] --> src/patterns/structural/flyweight/concrete_flyweight.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct ConcreteFlyweightOne; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/flyweight/concrete_flyweight.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl ConcreteFlyweightOne { [INFO] [stdout] | ------------------------- associated function in this implementation [INFO] [stdout] 13 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteFlyweightTwo` is never constructed [INFO] [stdout] --> src/patterns/structural/flyweight/concrete_flyweight.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ConcreteFlyweightTwo; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/flyweight/concrete_flyweight.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl ConcreteFlyweightTwo { [INFO] [stdout] | ------------------------- associated function in this implementation [INFO] [stdout] 28 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Shape` is never used [INFO] [stdout] --> src/patterns/structural/bridge/abstraction.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Shape { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Circle` is never constructed [INFO] [stdout] --> src/patterns/structural/bridge/refined_abstraction.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Circle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/bridge/refined_abstraction.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Circle { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 21 | pub fn new(x: i32, y: i32, radius: i32, color: Box) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Color` is never used [INFO] [stdout] --> src/patterns/structural/bridge/implementor.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Red` is never constructed [INFO] [stdout] --> src/patterns/structural/bridge/concrete_implementor.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Red; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/bridge/concrete_implementor.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Red { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 12 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Green` is never constructed [INFO] [stdout] --> src/patterns/structural/bridge/concrete_implementor.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Green; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/bridge/concrete_implementor.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Green { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 26 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Notifier` is never used [INFO] [stdout] --> src/patterns/structural/decorator/component.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Notifier { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SMSDecorator` is never constructed [INFO] [stdout] --> src/patterns/structural/decorator/decorator.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct SMSDecorator { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/decorator/decorator.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl SMSDecorator { [INFO] [stdout] | --------------------------------- associated function in this implementation [INFO] [stdout] 16 | pub fn new(notifier: T) -> SMSDecorator { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `QQDecorator` is never constructed [INFO] [stdout] --> src/patterns/structural/decorator/decorator.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct QQDecorator { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/decorator/decorator.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 35 | impl QQDecorator { [INFO] [stdout] | -------------------------------- associated function in this implementation [INFO] [stdout] 36 | pub fn new(notifier: T) -> QQDecorator { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BaseNotifier` is never constructed [INFO] [stdout] --> src/patterns/structural/decorator/concrete_component.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct BaseNotifier; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/structural/decorator/concrete_component.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | impl BaseNotifier { [INFO] [stdout] | ----------------- associated function in this implementation [INFO] [stdout] 13 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Middleware` is never used [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Middleware { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Request` is never constructed [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Request { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_name` are never used [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Request { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 13 | pub fn new(name: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn get_name(&self) -> String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MiddlewareAuth` is never constructed [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware_auth.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct MiddlewareAuth { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware_auth.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl MiddlewareAuth { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 9 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MiddlewareUpdate` is never constructed [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware_update.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct MiddlewareUpdate { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/chain_of_responsibility/middleware_update.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl MiddlewareUpdate { [INFO] [stdout] | --------------------- associated function in this implementation [INFO] [stdout] 9 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Command` is never used [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | pub trait Command { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CommandStart` is never constructed [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct CommandStart { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl CommandStart { [INFO] [stdout] | ----------------- associated function in this implementation [INFO] [stdout] 16 | pub fn new(m: Rc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CommandShutdown` is never constructed [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct CommandShutdown { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 34 | impl CommandShutdown { [INFO] [stdout] | -------------------- associated function in this implementation [INFO] [stdout] 35 | pub fn new(m: Rc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CommandRestart` is never constructed [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 49 | pub struct CommandRestart { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/command/command.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 53 | impl CommandRestart { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 54 | pub fn new(m: Rc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MotherBoard` is never constructed [INFO] [stdout] --> src/patterns/behavioral/command/receiver.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct MotherBoard; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `start`, `shutdown`, and `restart` are never used [INFO] [stdout] --> src/patterns/behavioral/command/receiver.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 4 | impl MotherBoard { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 5 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 9 | pub fn start(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | pub fn shutdown(&self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | pub fn restart(&self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Chassis` is never constructed [INFO] [stdout] --> src/patterns/behavioral/command/invoker.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Chassis { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `press_button_1`, `press_button_2`, and `press_button_3` are never used [INFO] [stdout] --> src/patterns/behavioral/command/invoker.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Chassis { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 11 | pub fn new(b1: Box, b2: Box, b3: Box) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn press_button_1(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn press_button_2(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn press_button_3(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Mediator` is never used [INFO] [stdout] --> src/patterns/behavioral/mediator/mediator.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Mediator { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ControlTower` is never constructed [INFO] [stdout] --> src/patterns/behavioral/mediator/mediator.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct ControlTower { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `add_member` are never used [INFO] [stdout] --> src/patterns/behavioral/mediator/mediator.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 13 | impl ControlTower { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 14 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn add_member(&mut self, air_plane: Box) -> &mut Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Colleague` is never used [INFO] [stdout] --> src/patterns/behavioral/mediator/colleague.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | pub trait Colleague { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AirBus320` is never constructed [INFO] [stdout] --> src/patterns/behavioral/mediator/colleague.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct AirBus320 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/mediator/colleague.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 17 | impl AirBus320 { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 18 | pub fn new(mediator: Rc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Boeing737` is never constructed [INFO] [stdout] --> src/patterns/behavioral/mediator/colleague.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | pub struct Boeing737 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/mediator/colleague.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 44 | impl Boeing737 { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 45 | pub fn new(mediator: Rc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MessageQueue` is never constructed [INFO] [stdout] --> src/patterns/behavioral/observer/publisher.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct MessageQueue { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_subscriber`, and `notify` are never used [INFO] [stdout] --> src/patterns/behavioral/observer/publisher.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl MessageQueue { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 9 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn add_subscriber(&mut self, s: Box) -> &mut Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | pub fn notify(&self, number: i32) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Subscriber` is never used [INFO] [stdout] --> src/patterns/behavioral/observer/subscriber.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Subscriber { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConsumerA` is never constructed [INFO] [stdout] --> src/patterns/behavioral/observer/subscriber.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct ConsumerA; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/observer/subscriber.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl ConsumerA { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConsumerB` is never constructed [INFO] [stdout] --> src/patterns/behavioral/observer/subscriber.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ConsumerB; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/observer/subscriber.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl ConsumerB { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 25 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Iterator` is never used [INFO] [stdout] --> src/patterns/behavioral/iterator/iterator.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Iterator { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/iterator/concrete_iterator.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 11 | impl DepthFirstIterator { [INFO] [stdout] | ----------------------- associated function in this implementation [INFO] [stdout] 12 | pub fn new(collection: Rc) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/iterator/concrete_iterator.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 34 | impl BreadthFirstIterator { [INFO] [stdout] | ------------------------- associated function in this implementation [INFO] [stdout] 35 | pub fn new(collection: Rc) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Collection` is never used [INFO] [stdout] --> src/patterns/behavioral/iterator/collection.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Collection { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `DataMiner` is never used [INFO] [stdout] --> src/patterns/behavioral/template/methods_interface.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait DataMiner { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PDFMiner` is never constructed [INFO] [stdout] --> src/patterns/behavioral/template/concrete_class.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct PDFMiner; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/template/concrete_class.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl PDFMiner { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 20 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CSVMiner` is never constructed [INFO] [stdout] --> src/patterns/behavioral/template/concrete_class.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct CSVMiner; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/template/concrete_class.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 41 | impl CSVMiner { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 42 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Template` is never constructed [INFO] [stdout] --> src/patterns/behavioral/template/template.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Template { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `process` are never used [INFO] [stdout] --> src/patterns/behavioral/template/template.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Template { [INFO] [stdout] | ------------------------------ associated items in this implementation [INFO] [stdout] 8 | pub fn new(miner: M) -> Template { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn process(&self, file: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Memento` is never used [INFO] [stdout] --> src/patterns/behavioral/memento/memento.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Memento { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Originator` is never used [INFO] [stdout] --> src/patterns/behavioral/memento/originator.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Originator { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Editor` is never constructed [INFO] [stdout] --> src/patterns/behavioral/memento/concrete_originator.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Editor { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_text` are never used [INFO] [stdout] --> src/patterns/behavioral/memento/concrete_originator.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl Editor { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 25 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn get_text(&self) -> &String { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Snapshot` is never constructed [INFO] [stdout] --> src/patterns/behavioral/memento/concrete_memento.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Snapshot { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/memento/concrete_memento.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Snapshot { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 15 | pub fn new(text: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Document` is never constructed [INFO] [stdout] --> src/patterns/behavioral/state/context.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Document { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `set_state`, `author_is_admin`, and `publish` are never used [INFO] [stdout] --> src/patterns/behavioral/state/context.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Document { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 10 | /// 新建文档默认为草稿状态 [INFO] [stdout] 11 | pub fn new(author: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn set_state(&mut self, state: Box) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn author_is_admin(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | pub fn publish(&mut self) -> Box { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Draft` is never constructed [INFO] [stdout] --> src/patterns/behavioral/state/concrete_state.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Draft; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/state/concrete_state.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | impl Draft { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 20 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Moderation` is never constructed [INFO] [stdout] --> src/patterns/behavioral/state/concrete_state.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | pub struct Moderation; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/state/concrete_state.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 40 | impl Moderation { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 41 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Published` is never constructed [INFO] [stdout] --> src/patterns/behavioral/state/concrete_state.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | pub struct Published; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/state/concrete_state.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 56 | impl Published { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 57 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `State` is never used [INFO] [stdout] --> src/patterns/behavioral/state/state.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `execute` are never used [INFO] [stdout] --> src/patterns/behavioral/strategy/context.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 7 | impl Navigator { [INFO] [stdout] | ----------------------------------- associated items in this implementation [INFO] [stdout] 8 | pub fn new(strategy: T) -> Navigator { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn execute(&self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `build` is never used [INFO] [stdout] --> src/patterns/behavioral/strategy/strategy.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait RouteStrategy { [INFO] [stdout] | ------------- method in this trait [INFO] [stdout] 2 | fn build(&self); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SubwayStrategy` is never constructed [INFO] [stdout] --> src/patterns/behavioral/strategy/concrete_strategy.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct SubwayStrategy; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/strategy/concrete_strategy.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl SubwayStrategy { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 13 | pub fn new() -> SubwayStrategy { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RidingStrategy` is never constructed [INFO] [stdout] --> src/patterns/behavioral/strategy/concrete_strategy.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct RidingStrategy; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/strategy/concrete_strategy.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl RidingStrategy { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 28 | pub fn new() -> RidingStrategy { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Visitor` is never used [INFO] [stdout] --> src/patterns/behavioral/visitor/visitor.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Visitor { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Building` is never used [INFO] [stdout] --> src/patterns/behavioral/visitor/visitable.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Building { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Saler` is never constructed [INFO] [stdout] --> src/patterns/behavioral/visitor/concrete_visitor.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Saler; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/patterns/behavioral/visitor/concrete_visitor.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 21 | impl Saler { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 22 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ResidentialBuilding` is never constructed [INFO] [stdout] --> src/patterns/behavioral/visitor/concrete_visitable_object.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct ResidentialBuilding { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_residents` are never used [INFO] [stdout] --> src/patterns/behavioral/visitor/concrete_visitable_object.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 15 | impl ResidentialBuilding { [INFO] [stdout] | ------------------------ associated items in this implementation [INFO] [stdout] 16 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn get_residents(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BankBuilding` is never constructed [INFO] [stdout] --> src/patterns/behavioral/visitor/concrete_visitable_object.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct BankBuilding { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get_staff` are never used [INFO] [stdout] --> src/patterns/behavioral/visitor/concrete_visitable_object.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 40 | impl BankBuilding { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 41 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn get_staff(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/patterns/creational/singleton/singleton_std.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | / SINGLETON [INFO] [stdout] 11 | | .get_or_insert_with( [INFO] [stdout] 12 | | || Arc::new( [INFO] [stdout] 13 | | Mutex::new( [INFO] [stdout] ... | [INFO] [stdout] 16 | | ), [INFO] [stdout] 17 | | ) [INFO] [stdout] | |_________________^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.35s [INFO] running `Command { std: "docker" "inspect" "67ed52f2f084e905b4235e1852ebe5097fd7f8b108c32b5d4471b62a8d07b3ac", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "67ed52f2f084e905b4235e1852ebe5097fd7f8b108c32b5d4471b62a8d07b3ac", kill_on_drop: false }` [INFO] [stdout] 67ed52f2f084e905b4235e1852ebe5097fd7f8b108c32b5d4471b62a8d07b3ac [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--no-run" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] f09ac25e3ff30a0fc25e18a5d012056d7c04010dbb714a34636e4e69647019c1 [INFO] running `Command { std: "docker" "start" "-a" "f09ac25e3ff30a0fc25e18a5d012056d7c04010dbb714a34636e4e69647019c1", kill_on_drop: false }` [INFO] [stderr] Compiling design-pattern v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/patterns/creational/singleton/singleton_std.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | / SINGLETON [INFO] [stdout] 11 | | .get_or_insert_with( [INFO] [stdout] 12 | | || Arc::new( [INFO] [stdout] 13 | | Mutex::new( [INFO] [stdout] ... | [INFO] [stdout] 16 | | ), [INFO] [stdout] 17 | | ) [INFO] [stdout] | |_________________^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.75s [INFO] running `Command { std: "docker" "inspect" "f09ac25e3ff30a0fc25e18a5d012056d7c04010dbb714a34636e4e69647019c1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f09ac25e3ff30a0fc25e18a5d012056d7c04010dbb714a34636e4e69647019c1", kill_on_drop: false }` [INFO] [stdout] f09ac25e3ff30a0fc25e18a5d012056d7c04010dbb714a34636e4e69647019c1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 2a11c6b103e9e9bdaeaa6cd39caee720d89e1a642a9d46a03e87bdbc7eb6cdf4 [INFO] running `Command { std: "docker" "start" "-a" "2a11c6b103e9e9bdaeaa6cd39caee720d89e1a642a9d46a03e87bdbc7eb6cdf4", kill_on_drop: false }` [INFO] [stderr] warning: creating a mutable reference to mutable static [INFO] [stderr] --> src/patterns/creational/singleton/singleton_std.rs:10:13 [INFO] [stderr] | [INFO] [stderr] 10 | / SINGLETON [INFO] [stderr] 11 | | .get_or_insert_with( [INFO] [stderr] 12 | | || Arc::new( [INFO] [stderr] 13 | | Mutex::new( [INFO] [stderr] ... | [INFO] [stderr] 16 | | ), [INFO] [stderr] 17 | | ) [INFO] [stderr] | |_________________^ mutable reference to mutable static [INFO] [stderr] | [INFO] [stderr] = note: for more information, see [INFO] [stderr] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stderr] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stderr] [INFO] [stderr] warning: `design-pattern` (bin "design-pattern" test) generated 1 warning [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.02s [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/design_pattern-4be57b01d9e6c9ff) [INFO] [stdout] [INFO] [stdout] running 26 tests [INFO] [stdout] test patterns::behavioral::chain_of_responsibility::tests::base ... ok [INFO] [stdout] test patterns::behavioral::command::tests::base ... ok [INFO] [stdout] test patterns::behavioral::iterator::tests::base ... ok [INFO] [stdout] test patterns::behavioral::memento::tests::base ... ok [INFO] [stdout] test patterns::behavioral::state::tests::base ... ok [INFO] [stdout] test patterns::behavioral::observer::tests::base ... ok [INFO] [stdout] test patterns::behavioral::mediator::tests::base ... ok [INFO] [stdout] test patterns::behavioral::template::tests::base ... ok [INFO] [stdout] test patterns::behavioral::visitor::tests::base ... ok [INFO] [stdout] test patterns::behavioral::strategy::tests::base ... ok [INFO] [stdout] test patterns::creational::factory::abstract_factory::tests::base ... ok [INFO] [stdout] test patterns::creational::factory::factory_method::tests::base ... ok [INFO] [stdout] test patterns::creational::factory::simple_factory::tests::base ... ok [INFO] [stdout] test patterns::creational::builder::tests::base ... ok [INFO] [stdout] test patterns::creational::prototype::tests::base ... ok [INFO] [stdout] test patterns::creational::singleton::tests::singleton_lazy_static ... ok [INFO] [stdout] test patterns::creational::singleton::tests::singleton_std ... ok [INFO] [stdout] test patterns::structural::adapter::tests::base ... ok [INFO] [stdout] test patterns::structural::bridge::tests::base ... ok [INFO] [stdout] test patterns::structural::composite::tests::base ... ok [INFO] [stdout] test patterns::structural::decorator::tests::base ... ok [INFO] [stdout] test patterns::structural::facade::tests::base ... ok [INFO] [stdout] test patterns::structural::flyweight::tests::base ... ok [INFO] [stdout] test patterns::structural::proxy::tests::base ... ok [INFO] [stdout] test patterns::behavioral::state::tests::test_exception - should panic ... ok [INFO] [stdout] test patterns::structural::flyweight::tests::test_panic - should panic ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "2a11c6b103e9e9bdaeaa6cd39caee720d89e1a642a9d46a03e87bdbc7eb6cdf4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a11c6b103e9e9bdaeaa6cd39caee720d89e1a642a9d46a03e87bdbc7eb6cdf4", kill_on_drop: false }` [INFO] [stdout] 2a11c6b103e9e9bdaeaa6cd39caee720d89e1a642a9d46a03e87bdbc7eb6cdf4