[INFO] cloning repository https://github.com/sfgwfn1402/designPattern [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/sfgwfn1402/designPattern" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsfgwfn1402%2FdesignPattern", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsfgwfn1402%2FdesignPattern'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] eaeda54c8a1ce041c9449feff4c02d6d1cf3b6ea [INFO] checking sfgwfn1402/designPattern against try#0cb362313295507a2f4321c0e30cea0168f2fe71 for pr-138961-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsfgwfn1402%2FdesignPattern" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/sfgwfn1402/designPattern [INFO] finished tweaking git repo https://github.com/sfgwfn1402/designPattern [INFO] tweaked toml for git repo https://github.com/sfgwfn1402/designPattern written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/sfgwfn1402/designPattern on toolchain 0cb362313295507a2f4321c0e30cea0168f2fe71 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+0cb362313295507a2f4321c0e30cea0168f2fe71" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/sfgwfn1402/designPattern 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" "+0cb362313295507a2f4321c0e30cea0168f2fe71" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:94a0c148923f5b2b52a63ef0eeb1882ad339ab61bce784c8077cbe41c61feb6c" "/opt/rustwide/cargo-home/bin/cargo" "+0cb362313295507a2f4321c0e30cea0168f2fe71" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0176afc7513dde1489c7f28a5179dc898c4f494ecbf909b50d494324fc279773 [INFO] running `Command { std: "docker" "start" "-a" "0176afc7513dde1489c7f28a5179dc898c4f494ecbf909b50d494324fc279773", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0176afc7513dde1489c7f28a5179dc898c4f494ecbf909b50d494324fc279773", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0176afc7513dde1489c7f28a5179dc898c4f494ecbf909b50d494324fc279773", kill_on_drop: false }` [INFO] [stdout] 0176afc7513dde1489c7f28a5179dc898c4f494ecbf909b50d494324fc279773 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:94a0c148923f5b2b52a63ef0eeb1882ad339ab61bce784c8077cbe41c61feb6c" "/opt/rustwide/cargo-home/bin/cargo" "+0cb362313295507a2f4321c0e30cea0168f2fe71" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 89d06f105687535ec190565d2aff82972901940f5690a599d3420247fc2cb99e [INFO] running `Command { std: "docker" "start" "-a" "89d06f105687535ec190565d2aff82972901940f5690a599d3420247fc2cb99e", kill_on_drop: false }` [INFO] [stderr] Checking designPattern v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `str` [INFO] [stdout] --> src/behavioral/command.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{str, sync::{Arc, Mutex}}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Memento` [INFO] [stdout] --> src/main.rs:6:42 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::behavioral::memento::{Editor, Memento}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::behavioral::iterator::MyIterator` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::behavioral::iterator::MyIterator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VotingMachine` [INFO] [stdout] --> src/main.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::behavioral::state::{VotingMachine}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ButtonFactory`, `Button`, `WebButtonFactory`, and `WindowsButtonFactory` [INFO] [stdout] --> src/main.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::creational::factory_method::{Button, ButtonFactory, WindowsButtonFactory, WebButtonFactory}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Circle` and `Prototype` [INFO] [stdout] --> src/main.rs:10:36 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::creational::prototype::{Circle, Prototype}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Command`, `LightOnCommand`, `Light`, and `RemoteControl` [INFO] [stdout] --> src/main.rs:11:34 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::behavioral::command::{Command, Light, LightOnCommand, RemoteControl}; [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConcreteObserver`, `Observer`, and `Subject` [INFO] [stdout] --> src/main.rs:12:35 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::behavioral::observer::{Subject, Observer, ConcreteObserver}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Component`, `ConcreteComponent`, and `ConcreteDecoratorA` [INFO] [stdout] --> src/main.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::structural::decorator::{Component, ConcreteComponent, ConcreteDecoratorA}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `divide` and `safe_divide` [INFO] [stdout] --> src/main.rs:14:37 [INFO] [stdout] | [INFO] [stdout] 14 | use crate::specific::panic_result::{divide, safe_divide}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConfigBuilder` and `Config` [INFO] [stdout] --> src/main.rs:15:42 [INFO] [stdout] | [INFO] [stdout] 15 | use crate::creational::builder_default::{Config, ConfigBuilder}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::phantom_data::MyBox2` [INFO] [stdout] --> src/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::specific::phantom_data::MyBox2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::drop::MyResource` [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::specific::drop::MyResource; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MyData`, `ReadWriteData`, and `SharedCounter` [INFO] [stdout] --> src/main.rs:18:44 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::specific::interior_mutability::{MyData, SharedCounter, ReadWriteData}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Mutex` [INFO] [stdout] --> src/main.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | use std::sync::Mutex; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `JoinHandle` and `self` [INFO] [stdout] --> src/main.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | use std::thread::{self, JoinHandle}; [INFO] [stdout] | ^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::deref_coercion::MyBox` [INFO] [stdout] --> src/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | use crate::specific::deref_coercion::MyBox; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::deref_coercion::say_hello` [INFO] [stdout] --> src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use crate::specific::deref_coercion::say_hello; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `UserId` [INFO] [stdout] --> src/main.rs:28:33 [INFO] [stdout] | [INFO] [stdout] 28 | use crate::specific::new_type::{UserId}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConnectionPool` and `Connection` [INFO] [stdout] --> src/main.rs:29:37 [INFO] [stdout] | [INFO] [stdout] 29 | use crate::creational::objectpoll::{Connection, ConnectionPool}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::creational::singleton2::Singleton2` [INFO] [stdout] --> src/main.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | use crate::creational::singleton2::Singleton2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::creational::singleton::Singleton` [INFO] [stdout] --> src/main.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::creational::singleton::Singleton; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LegacyRectangle`, `RectangleAdapter`, and `Shape` [INFO] [stdout] --> src/main.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | use crate::structural::adapter::{LegacyRectangle, RectangleAdapter, Shape}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::structural::flyweight::FlyweightFactory` [INFO] [stdout] --> src/main.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use crate::structural::flyweight::FlyweightFactory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConcreteHandlerA`, `ConcreteHandlerB`, `Handler`, and `Request` [INFO] [stdout] --> src/main.rs:35:47 [INFO] [stdout] | [INFO] [stdout] 35 | use crate::behavioral::responsibility_chain::{ConcreteHandlerA, ConcreteHandlerB, Handler, Request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConcreteStrategyA`, `ConcreteStrategyB`, and `Context` [INFO] [stdout] --> src/main.rs:36:35 [INFO] [stdout] | [INFO] [stdout] 36 | use crate::behavioral::strategy::{ConcreteStrategyA, ConcreteStrategyB, Context}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AbstractClass`, `ConcreteClassA`, and `ConcreteClassB` [INFO] [stdout] --> src/main.rs:37:42 [INFO] [stdout] | [INFO] [stdout] 37 | use crate::behavioral::template_method::{AbstractClass, ConcreteClassA, ConcreteClassB}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `str` [INFO] [stdout] --> src/behavioral/command.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{str, sync::{Arc, Mutex}}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Memento` [INFO] [stdout] --> src/main.rs:6:42 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::behavioral::memento::{Editor, Memento}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::behavioral::iterator::MyIterator` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::behavioral::iterator::MyIterator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VotingMachine` [INFO] [stdout] --> src/main.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::behavioral::state::{VotingMachine}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ButtonFactory`, `Button`, `WebButtonFactory`, and `WindowsButtonFactory` [INFO] [stdout] --> src/main.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::creational::factory_method::{Button, ButtonFactory, WindowsButtonFactory, WebButtonFactory}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Circle` and `Prototype` [INFO] [stdout] --> src/main.rs:10:36 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::creational::prototype::{Circle, Prototype}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Command`, `LightOnCommand`, `Light`, and `RemoteControl` [INFO] [stdout] --> src/main.rs:11:34 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::behavioral::command::{Command, Light, LightOnCommand, RemoteControl}; [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConcreteObserver`, `Observer`, and `Subject` [INFO] [stdout] --> src/main.rs:12:35 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::behavioral::observer::{Subject, Observer, ConcreteObserver}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Component`, `ConcreteComponent`, and `ConcreteDecoratorA` [INFO] [stdout] --> src/main.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::structural::decorator::{Component, ConcreteComponent, ConcreteDecoratorA}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `divide` and `safe_divide` [INFO] [stdout] --> src/main.rs:14:37 [INFO] [stdout] | [INFO] [stdout] 14 | use crate::specific::panic_result::{divide, safe_divide}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConfigBuilder` and `Config` [INFO] [stdout] --> src/main.rs:15:42 [INFO] [stdout] | [INFO] [stdout] 15 | use crate::creational::builder_default::{Config, ConfigBuilder}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::phantom_data::MyBox2` [INFO] [stdout] --> src/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::specific::phantom_data::MyBox2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::drop::MyResource` [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::specific::drop::MyResource; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MyData`, `ReadWriteData`, and `SharedCounter` [INFO] [stdout] --> src/main.rs:18:44 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::specific::interior_mutability::{MyData, SharedCounter, ReadWriteData}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Mutex` [INFO] [stdout] --> src/main.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | use std::sync::Mutex; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `JoinHandle` and `self` [INFO] [stdout] --> src/main.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | use std::thread::{self, JoinHandle}; [INFO] [stdout] | ^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> src/main.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::deref_coercion::MyBox` [INFO] [stdout] --> src/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | use crate::specific::deref_coercion::MyBox; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::specific::deref_coercion::say_hello` [INFO] [stdout] --> src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use crate::specific::deref_coercion::say_hello; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `UserId` [INFO] [stdout] --> src/main.rs:28:33 [INFO] [stdout] | [INFO] [stdout] 28 | use crate::specific::new_type::{UserId}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConnectionPool` and `Connection` [INFO] [stdout] --> src/main.rs:29:37 [INFO] [stdout] | [INFO] [stdout] 29 | use crate::creational::objectpoll::{Connection, ConnectionPool}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::creational::singleton2::Singleton2` [INFO] [stdout] --> src/main.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | use crate::creational::singleton2::Singleton2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::creational::singleton::Singleton` [INFO] [stdout] --> src/main.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use crate::creational::singleton::Singleton; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `LegacyRectangle`, `RectangleAdapter`, and `Shape` [INFO] [stdout] --> src/main.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | use crate::structural::adapter::{LegacyRectangle, RectangleAdapter, Shape}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::structural::flyweight::FlyweightFactory` [INFO] [stdout] --> src/main.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | use crate::structural::flyweight::FlyweightFactory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConcreteHandlerA`, `ConcreteHandlerB`, `Handler`, and `Request` [INFO] [stdout] --> src/main.rs:35:47 [INFO] [stdout] | [INFO] [stdout] 35 | use crate::behavioral::responsibility_chain::{ConcreteHandlerA, ConcreteHandlerB, Handler, Request}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConcreteStrategyA`, `ConcreteStrategyB`, and `Context` [INFO] [stdout] --> src/main.rs:36:35 [INFO] [stdout] | [INFO] [stdout] 36 | use crate::behavioral::strategy::{ConcreteStrategyA, ConcreteStrategyB, Context}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AbstractClass`, `ConcreteClassA`, and `ConcreteClassB` [INFO] [stdout] --> src/main.rs:37:42 [INFO] [stdout] | [INFO] [stdout] 37 | use crate::behavioral::template_method::{AbstractClass, ConcreteClassA, ConcreteClassB}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StateVisitor` is more private than the item `visitor::VotingMachine::accept` [INFO] [stdout] --> src/behavioral/visitor.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | pub fn accept(&self, visitor: &mut dyn StateVisitor) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `visitor::VotingMachine::accept` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but trait `StateVisitor` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/behavioral/visitor.rs:68:1 [INFO] [stdout] | [INFO] [stdout] 68 | trait StateVisitor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Command` is never used [INFO] [stdout] --> src/behavioral/command.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub trait Command { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Light` is never constructed [INFO] [stdout] --> src/behavioral/command.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct Light{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `turn_on`, and `turn_off` are never used [INFO] [stdout] --> src/behavioral/command.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Light { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 26 | /// 创建一个新的 Light 实例 [INFO] [stdout] 27 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn turn_on(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn turn_off(&mut self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LightOnCommand` is never constructed [INFO] [stdout] --> src/behavioral/command.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub struct LightOnCommand { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/behavioral/command.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl LightOnCommand { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 49 | pub fn new(light: Arc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RemoteControl` is never constructed [INFO] [stdout] --> src/behavioral/command.rs:85:12 [INFO] [stdout] | [INFO] [stdout] 85 | pub struct RemoteControl{ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `set_command`, `press_button`, and `undo_button` are never used [INFO] [stdout] --> src/behavioral/command.rs:92:12 [INFO] [stdout] | [INFO] [stdout] 90 | impl RemoteControl { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 91 | ///创建遥控器 [INFO] [stdout] 92 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | pub fn set_command(&mut self, command : Box) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn press_button(self : &Self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn undo_button(self : &Self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/command.rs:116:4 [INFO] [stdout] | [INFO] [stdout] 116 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `VotingState` is never used [INFO] [stdout] --> src/behavioral/state.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | trait VotingState { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NotVoted` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | struct NotVoted; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Voted` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | struct Voted; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Locked` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Locked; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `VotingMachine` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | pub struct VotingMachine { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `vote`, and `status` are never used [INFO] [stdout] --> src/behavioral/state.rs:75:12 [INFO] [stdout] | [INFO] [stdout] 73 | impl VotingMachine { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 74 | /// 创建投票机器 [INFO] [stdout] 75 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn vote(&mut self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 90 | pub fn status(&self) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/state.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `VotingState` is never used [INFO] [stdout] --> src/behavioral/visitor.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | trait VotingState: Send + Sync { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NotVoted` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct NotVoted; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Voted` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct Voted; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Locked` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Locked; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StateVisitor` is never used [INFO] [stdout] --> src/behavioral/visitor.rs:68:7 [INFO] [stdout] | [INFO] [stdout] 68 | trait StateVisitor { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LoggingVisitor` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:79:8 [INFO] [stdout] | [INFO] [stdout] 79 | struct LoggingVisitor; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AuditVisitor` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:96:8 [INFO] [stdout] | [INFO] [stdout] 96 | struct AuditVisitor; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `VotingMachine` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | pub struct VotingMachine { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `vote`, `status`, and `accept` are never used [INFO] [stdout] --> src/behavioral/visitor.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 120 | impl VotingMachine { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 121 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn vote(&mut self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | pub fn status(&self) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub fn accept(&self, visitor: &mut dyn StateVisitor) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/visitor.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Observer` is never used [INFO] [stdout] --> src/behavioral/observer.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Observer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteObserver` is never constructed [INFO] [stdout] --> src/behavioral/observer.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct ConcreteObserver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Subject` is never constructed [INFO] [stdout] --> src/behavioral/observer.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Subject { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `register_observer`, and `notify_observers` are never used [INFO] [stdout] --> src/behavioral/observer.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl Subject { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 23 | /// 创建主题 [INFO] [stdout] 24 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn register_observer(&mut self, observer: Box) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn notify_observers(&self, message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/observer.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Request` is never constructed [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Request{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Handler` is never used [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | pub trait Handler{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteHandlerA` is never constructed [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct ConcreteHandlerA{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteHandlerB` is never constructed [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct ConcreteHandlerB{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Strategy` is never used [INFO] [stdout] --> src/behavioral/strategy.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Strategy { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteStrategyA` is never constructed [INFO] [stdout] --> src/behavioral/strategy.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct ConcreteStrategyA; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteStrategyB` is never constructed [INFO] [stdout] --> src/behavioral/strategy.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ConcreteStrategyB; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Context` is never constructed [INFO] [stdout] --> src/behavioral/strategy.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct Context { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `set_strategy`, and `execute_strategy` are never used [INFO] [stdout] --> src/behavioral/strategy.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl Context { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 30 | //创建环境实例 [INFO] [stdout] 31 | pub fn new(strategy: Box) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn set_strategy(&mut self, strategy: Box){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn execute_strategy(&self){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `AbstractClass` is never used [INFO] [stdout] --> src/behavioral/template_method.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait AbstractClass { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteClassA` is never constructed [INFO] [stdout] --> src/behavioral/template_method.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ConcreteClassA; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteClassB` is never constructed [INFO] [stdout] --> src/behavioral/template_method.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct ConcreteClassB; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyIterator` is never constructed [INFO] [stdout] --> src/behavioral/iterator.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct MyIterator<'a> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/behavioral/iterator.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl<'a> MyIterator<'a> { [INFO] [stdout] | ----------------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new(data: &'a [i32]) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/iterator.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/memento.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Button` is never used [INFO] [stdout] --> src/creational/factory_method.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | pub trait Button { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WindowsButton` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | pub struct WindowsButton; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WebButton` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | pub struct WebButton; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ButtonFactory` is never used [INFO] [stdout] --> src/creational/factory_method.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | pub trait ButtonFactory { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WindowsButtonFactory` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub struct WindowsButtonFactory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WebButtonFactory` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | pub struct WebButtonFactory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/factory_method.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config` is never constructed [INFO] [stdout] --> src/creational/builder_default.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConfigBuilder` is never constructed [INFO] [stdout] --> src/creational/builder_default.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct ConfigBuilder { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `timeout`, `retries`, `enable_logging`, `max_connections`, and `build` are never used [INFO] [stdout] --> src/creational/builder_default.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl ConfigBuilder { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] 43 | pub fn timeout(mut self, timeout: Duration) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn retries(mut self, retries: u32) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn enable_logging(mut self, enable_logging: bool) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn max_connections(mut self, max_connections: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn build(self) -> Config { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/builder_default.rs:74:4 [INFO] [stdout] | [INFO] [stdout] 74 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Connection` is never constructed [INFO] [stdout] --> src/creational/objectpoll.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Connection { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `connect` are never used [INFO] [stdout] --> src/creational/objectpoll.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Connection { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 11 | pub fn new(id: u32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn connect(&self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConnectionPool` is never constructed [INFO] [stdout] --> src/creational/objectpoll.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ConnectionPool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get_connection`, and `release_connection` are never used [INFO] [stdout] --> src/creational/objectpoll.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl ConnectionPool { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 27 | // 创建新的连接池 [INFO] [stdout] 28 | pub fn new(size: usize) -> Arc { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn get_connection(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn release_connection(&self, conn: Connection) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/objectpoll.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Singleton` is never constructed [INFO] [stdout] --> src/creational/singleton.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Singleton { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SINGLETON_INSTANCE` is never used [INFO] [stdout] --> src/creational/singleton.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | static mut SINGLETON_INSTANCE: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/creational/singleton.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `get_instance` and `do_something` are never used [INFO] [stdout] --> src/creational/singleton.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Singleton { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 20 | // 获取单例实例的引用 [INFO] [stdout] 21 | pub fn get_instance() -> &'static Self { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn do_something(&self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/singleton.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Singleton2` is never constructed [INFO] [stdout] --> src/creational/singleton2.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Singleton2 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SINGLETON_INSTANCE` is never used [INFO] [stdout] --> src/creational/singleton2.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | static mut SINGLETON_INSTANCE: Option> = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/creational/singleton2.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `get_instance` is never used [INFO] [stdout] --> src/creational/singleton2.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Singleton2 { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 11 | pub fn get_instance() -> &'static Mutex { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/creational/singleton3.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `CONFIG_MAP` is never used [INFO] [stdout] --> src/creational/singleton3.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | static mut CONFIG_MAP: Option>> = None; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_config_map` is never used [INFO] [stdout] --> src/creational/singleton3.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | fn get_config_map() -> &'static Mutex> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set` is never used [INFO] [stdout] --> src/creational/singleton3.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn set(key: &str, value: &str) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get` is never used [INFO] [stdout] --> src/creational/singleton3.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn get(key: &str) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Circle` is never constructed [INFO] [stdout] --> src/creational/prototype.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct Circle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Prototype` is never used [INFO] [stdout] --> src/creational/prototype.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 26 | pub trait Prototype { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/prototype.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyBox` is never constructed [INFO] [stdout] --> src/specific/deref_coercion.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct MyBox(T); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/specific/deref_coercion.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl MyBox { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 13 | // 创建一个新的 MyBox 实例 [INFO] [stdout] 14 | pub fn new(x: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello` is never used [INFO] [stdout] --> src/specific/deref_coercion.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn say_hello(name: &str) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/deref_coercion.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyResource` is never constructed [INFO] [stdout] --> src/specific/drop.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct MyResource { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/drop.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyData` is never constructed [INFO] [stdout] --> src/specific/interior_mutability.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct MyData { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `increment`, and `get_value` are never used [INFO] [stdout] --> src/specific/interior_mutability.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl MyData { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 12 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn increment(&self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | pub fn get_value(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SharedCounter` is never constructed [INFO] [stdout] --> src/specific/interior_mutability.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct SharedCounter { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `increment`, and `get_count` are never used [INFO] [stdout] --> src/specific/interior_mutability.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 34 | impl SharedCounter { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 35 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn increment(&self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn get_count(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ReadWriteData` is never constructed [INFO] [stdout] --> src/specific/interior_mutability.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | pub struct ReadWriteData { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `read_data`, and `write_data` are never used [INFO] [stdout] --> src/specific/interior_mutability.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 57 | impl ReadWriteData { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 58 | pub fn new(s: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn read_data(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn write_data(&self, new_val: &str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/interior_mutability.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserId` is never constructed [INFO] [stdout] --> src/specific/new_type.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct UserId(u32); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get` are never used [INFO] [stdout] --> src/specific/new_type.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl UserId { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 15 | // 创建一个新的 UserId 实例 [INFO] [stdout] 16 | pub fn new(id: u32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn get(&self) -> u32 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/new_type.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `divide` is never used [INFO] [stdout] --> src/specific/panic_result.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn divide(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `safe_divide` is never used [INFO] [stdout] --> src/specific/panic_result.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn safe_divide(a: i32, b: i32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/panic_result.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyBox2` is never constructed [INFO] [stdout] --> src/specific/phantom_data.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct MyBox2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get` are never used [INFO] [stdout] --> src/specific/phantom_data.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl MyBox2 { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 15 | /// 创建一个新的 MyBox,指向给定值的只读指针 [INFO] [stdout] 16 | pub fn new(value: &T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn get(&self) -> &T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Shape` is never used [INFO] [stdout] --> src/structural/adapter.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Shape { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LegacyRectangle` is never constructed [INFO] [stdout] --> src/structural/adapter.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct LegacyRectangle { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `draw_old` is never used [INFO] [stdout] --> src/structural/adapter.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl LegacyRectangle { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] 15 | fn draw_old(&self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RectangleAdapter` is never constructed [INFO] [stdout] --> src/structural/adapter.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct RectangleAdapter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/structural/adapter.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Renderer` is never used [INFO] [stdout] --> src/structural/bridge.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait Renderer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenGLRenderer` is never constructed [INFO] [stdout] --> src/structural/bridge.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct OpenGLRenderer; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DirectXRenderer` is never constructed [INFO] [stdout] --> src/structural/bridge.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct DirectXRenderer; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Circle` is never constructed [INFO] [stdout] --> src/structural/bridge.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct Circle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `draw` are never used [INFO] [stdout] --> src/structural/bridge.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 45 | impl Circle { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn new(renderer: Box, radius: f64) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn draw(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/structural/bridge.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Component` is never used [INFO] [stdout] --> src/structural/decorator.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Component { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteComponent` is never constructed [INFO] [stdout] --> src/structural/decorator.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct ConcreteComponent; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Decorator` is never used [INFO] [stdout] --> src/structural/decorator.rs:17:11 [INFO] [stdout] | [INFO] [stdout] 17 | pub trait Decorator: Component {} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteDecoratorA` is never constructed [INFO] [stdout] --> src/structural/decorator.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ConcreteDecoratorA { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `added_behavior` are never used [INFO] [stdout] --> src/structural/decorator.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl ConcreteDecoratorA { [INFO] [stdout] | ---------------------------------------- associated items in this implementation [INFO] [stdout] 28 | pub fn new(component: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | fn added_behavior(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/structural/decorator.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Flyweight` is never used [INFO] [stdout] --> src/structural/flyweight.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Flyweight { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteFlyweight` is never constructed [INFO] [stdout] --> src/structural/flyweight.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct ConcreteFlyweight { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FlyweightFactory` is never constructed [INFO] [stdout] --> src/structural/flyweight.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct FlyweightFactory { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `handle`, `get_flyweight`, and `push_flyweight` are never used [INFO] [stdout] --> src/structural/flyweight.rs:27:19 [INFO] [stdout] | [INFO] [stdout] 25 | impl FlyweightFactory { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] 26 | ///处理数据 [INFO] [stdout] 27 | pub(crate) fn handle(&mut self, s: &str) ->Option<&ConcreteFlyweight> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn get_flyweight(&mut self, intrinsic_state: &str) -> Option<&ConcreteFlyweight> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn push_flyweight(&mut self, intrinsic_state: String) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Subject` is never used [INFO] [stdout] --> src/structural/proxy.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Subject { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RealSubject` is never constructed [INFO] [stdout] --> src/structural/proxy.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct RealSubject; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Proxy` is never constructed [INFO] [stdout] --> src/structural/proxy.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct Proxy{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pre_request` and `post_request` are never used [INFO] [stdout] --> src/structural/proxy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 29 | impl Proxy{ [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 30 | fn pre_request(&self){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn post_request(&self){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/creational/singleton.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | SINGLETON_INSTANCE.as_ref().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/creational/singleton2.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | SINGLETON_INSTANCE.as_ref().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/creational/singleton3.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | CONFIG_MAP.as_ref().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StateVisitor` is more private than the item `visitor::VotingMachine::accept` [INFO] [stdout] --> src/behavioral/visitor.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | pub fn accept(&self, visitor: &mut dyn StateVisitor) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `visitor::VotingMachine::accept` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but trait `StateVisitor` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/behavioral/visitor.rs:68:1 [INFO] [stdout] | [INFO] [stdout] 68 | trait StateVisitor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Command` is never used [INFO] [stdout] --> src/behavioral/command.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub trait Command { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Light` is never constructed [INFO] [stdout] --> src/behavioral/command.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct Light{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `turn_on`, and `turn_off` are never used [INFO] [stdout] --> src/behavioral/command.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Light { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 26 | /// 创建一个新的 Light 实例 [INFO] [stdout] 27 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | pub fn turn_on(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn turn_off(&mut self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LightOnCommand` is never constructed [INFO] [stdout] --> src/behavioral/command.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub struct LightOnCommand { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/behavioral/command.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl LightOnCommand { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 49 | pub fn new(light: Arc>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RemoteControl` is never constructed [INFO] [stdout] --> src/behavioral/command.rs:85:12 [INFO] [stdout] | [INFO] [stdout] 85 | pub struct RemoteControl{ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `set_command`, `press_button`, and `undo_button` are never used [INFO] [stdout] --> src/behavioral/command.rs:92:12 [INFO] [stdout] | [INFO] [stdout] 90 | impl RemoteControl { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 91 | ///创建遥控器 [INFO] [stdout] 92 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | pub fn set_command(&mut self, command : Box) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn press_button(self : &Self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn undo_button(self : &Self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/command.rs:116:4 [INFO] [stdout] | [INFO] [stdout] 116 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `VotingState` is never used [INFO] [stdout] --> src/behavioral/state.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | trait VotingState { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NotVoted` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | struct NotVoted; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Voted` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | struct Voted; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Locked` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Locked; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `VotingMachine` is never constructed [INFO] [stdout] --> src/behavioral/state.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | pub struct VotingMachine { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `vote`, and `status` are never used [INFO] [stdout] --> src/behavioral/state.rs:75:12 [INFO] [stdout] | [INFO] [stdout] 73 | impl VotingMachine { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 74 | /// 创建投票机器 [INFO] [stdout] 75 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | pub fn vote(&mut self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 90 | pub fn status(&self) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/state.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `VotingState` is never used [INFO] [stdout] --> src/behavioral/visitor.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | trait VotingState: Send + Sync { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NotVoted` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct NotVoted; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Voted` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct Voted; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Locked` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Locked; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `StateVisitor` is never used [INFO] [stdout] --> src/behavioral/visitor.rs:68:7 [INFO] [stdout] | [INFO] [stdout] 68 | trait StateVisitor { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LoggingVisitor` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:79:8 [INFO] [stdout] | [INFO] [stdout] 79 | struct LoggingVisitor; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AuditVisitor` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:96:8 [INFO] [stdout] | [INFO] [stdout] 96 | struct AuditVisitor; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `VotingMachine` is never constructed [INFO] [stdout] --> src/behavioral/visitor.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | pub struct VotingMachine { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `vote`, `status`, and `accept` are never used [INFO] [stdout] --> src/behavioral/visitor.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 120 | impl VotingMachine { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 121 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | pub fn vote(&mut self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | pub fn status(&self) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub fn accept(&self, visitor: &mut dyn StateVisitor) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/visitor.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Observer` is never used [INFO] [stdout] --> src/behavioral/observer.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Observer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteObserver` is never constructed [INFO] [stdout] --> src/behavioral/observer.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct ConcreteObserver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Subject` is never constructed [INFO] [stdout] --> src/behavioral/observer.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct Subject { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `register_observer`, and `notify_observers` are never used [INFO] [stdout] --> src/behavioral/observer.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl Subject { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 23 | /// 创建主题 [INFO] [stdout] 24 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn register_observer(&mut self, observer: Box) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | pub fn notify_observers(&self, message: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/observer.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Request` is never constructed [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Request{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Handler` is never used [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | pub trait Handler{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteHandlerA` is never constructed [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct ConcreteHandlerA{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteHandlerB` is never constructed [INFO] [stdout] --> src/behavioral/responsibility_chain.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct ConcreteHandlerB{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Strategy` is never used [INFO] [stdout] --> src/behavioral/strategy.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Strategy { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteStrategyA` is never constructed [INFO] [stdout] --> src/behavioral/strategy.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct ConcreteStrategyA; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteStrategyB` is never constructed [INFO] [stdout] --> src/behavioral/strategy.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ConcreteStrategyB; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Context` is never constructed [INFO] [stdout] --> src/behavioral/strategy.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct Context { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `set_strategy`, and `execute_strategy` are never used [INFO] [stdout] --> src/behavioral/strategy.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl Context { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 30 | //创建环境实例 [INFO] [stdout] 31 | pub fn new(strategy: Box) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn set_strategy(&mut self, strategy: Box){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn execute_strategy(&self){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `AbstractClass` is never used [INFO] [stdout] --> src/behavioral/template_method.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait AbstractClass { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteClassA` is never constructed [INFO] [stdout] --> src/behavioral/template_method.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct ConcreteClassA; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteClassB` is never constructed [INFO] [stdout] --> src/behavioral/template_method.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct ConcreteClassB; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyIterator` is never constructed [INFO] [stdout] --> src/behavioral/iterator.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct MyIterator<'a> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/behavioral/iterator.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl<'a> MyIterator<'a> { [INFO] [stdout] | ----------------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new(data: &'a [i32]) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/iterator.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/behavioral/memento.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Button` is never used [INFO] [stdout] --> src/creational/factory_method.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | pub trait Button { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WindowsButton` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | pub struct WindowsButton; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WebButton` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | pub struct WebButton; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `ButtonFactory` is never used [INFO] [stdout] --> src/creational/factory_method.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | pub trait ButtonFactory { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WindowsButtonFactory` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub struct WindowsButtonFactory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WebButtonFactory` is never constructed [INFO] [stdout] --> src/creational/factory_method.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | pub struct WebButtonFactory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/factory_method.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Config` is never constructed [INFO] [stdout] --> src/creational/builder_default.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct Config { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConfigBuilder` is never constructed [INFO] [stdout] --> src/creational/builder_default.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub struct ConfigBuilder { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `timeout`, `retries`, `enable_logging`, `max_connections`, and `build` are never used [INFO] [stdout] --> src/creational/builder_default.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl ConfigBuilder { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] 43 | pub fn timeout(mut self, timeout: Duration) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn retries(mut self, retries: u32) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn enable_logging(mut self, enable_logging: bool) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn max_connections(mut self, max_connections: usize) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn build(self) -> Config { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/builder_default.rs:74:4 [INFO] [stdout] | [INFO] [stdout] 74 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Connection` is never constructed [INFO] [stdout] --> src/creational/objectpoll.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Connection { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `connect` are never used [INFO] [stdout] --> src/creational/objectpoll.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Connection { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 11 | pub fn new(id: u32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn connect(&self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConnectionPool` is never constructed [INFO] [stdout] --> src/creational/objectpoll.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ConnectionPool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `get_connection`, and `release_connection` are never used [INFO] [stdout] --> src/creational/objectpoll.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl ConnectionPool { [INFO] [stdout] | ------------------- associated items in this implementation [INFO] [stdout] 27 | // 创建新的连接池 [INFO] [stdout] 28 | pub fn new(size: usize) -> Arc { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn get_connection(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn release_connection(&self, conn: Connection) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/objectpoll.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Singleton` is never constructed [INFO] [stdout] --> src/creational/singleton.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Singleton { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SINGLETON_INSTANCE` is never used [INFO] [stdout] --> src/creational/singleton.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | static mut SINGLETON_INSTANCE: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/creational/singleton.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `get_instance` and `do_something` are never used [INFO] [stdout] --> src/creational/singleton.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Singleton { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 20 | // 获取单例实例的引用 [INFO] [stdout] 21 | pub fn get_instance() -> &'static Self { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn do_something(&self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/singleton.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Singleton2` is never constructed [INFO] [stdout] --> src/creational/singleton2.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Singleton2 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SINGLETON_INSTANCE` is never used [INFO] [stdout] --> src/creational/singleton2.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | static mut SINGLETON_INSTANCE: Option> = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/creational/singleton2.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `get_instance` is never used [INFO] [stdout] --> src/creational/singleton2.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl Singleton2 { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 11 | pub fn get_instance() -> &'static Mutex { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `INIT` is never used [INFO] [stdout] --> src/creational/singleton3.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | static INIT: Once = Once::new(); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `CONFIG_MAP` is never used [INFO] [stdout] --> src/creational/singleton3.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | static mut CONFIG_MAP: Option>> = None; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_config_map` is never used [INFO] [stdout] --> src/creational/singleton3.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | fn get_config_map() -> &'static Mutex> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set` is never used [INFO] [stdout] --> src/creational/singleton3.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn set(key: &str, value: &str) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get` is never used [INFO] [stdout] --> src/creational/singleton3.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn get(key: &str) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Circle` is never constructed [INFO] [stdout] --> src/creational/prototype.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct Circle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Prototype` is never used [INFO] [stdout] --> src/creational/prototype.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 26 | pub trait Prototype { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/creational/prototype.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyBox` is never constructed [INFO] [stdout] --> src/specific/deref_coercion.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct MyBox(T); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/specific/deref_coercion.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl MyBox { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 13 | // 创建一个新的 MyBox 实例 [INFO] [stdout] 14 | pub fn new(x: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `say_hello` is never used [INFO] [stdout] --> src/specific/deref_coercion.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn say_hello(name: &str) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/deref_coercion.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyResource` is never constructed [INFO] [stdout] --> src/specific/drop.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct MyResource { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/drop.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyData` is never constructed [INFO] [stdout] --> src/specific/interior_mutability.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct MyData { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `increment`, and `get_value` are never used [INFO] [stdout] --> src/specific/interior_mutability.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl MyData { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 12 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn increment(&self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | pub fn get_value(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SharedCounter` is never constructed [INFO] [stdout] --> src/specific/interior_mutability.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct SharedCounter { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `increment`, and `get_count` are never used [INFO] [stdout] --> src/specific/interior_mutability.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 34 | impl SharedCounter { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 35 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn increment(&self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn get_count(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ReadWriteData` is never constructed [INFO] [stdout] --> src/specific/interior_mutability.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | pub struct ReadWriteData { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `read_data`, and `write_data` are never used [INFO] [stdout] --> src/specific/interior_mutability.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 57 | impl ReadWriteData { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 58 | pub fn new(s: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn read_data(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn write_data(&self, new_val: &str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/interior_mutability.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserId` is never constructed [INFO] [stdout] --> src/specific/new_type.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | pub struct UserId(u32); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get` are never used [INFO] [stdout] --> src/specific/new_type.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl UserId { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 15 | // 创建一个新的 UserId 实例 [INFO] [stdout] 16 | pub fn new(id: u32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | pub fn get(&self) -> u32 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/new_type.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `divide` is never used [INFO] [stdout] --> src/specific/panic_result.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn divide(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `safe_divide` is never used [INFO] [stdout] --> src/specific/panic_result.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn safe_divide(a: i32, b: i32) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/specific/panic_result.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyBox2` is never constructed [INFO] [stdout] --> src/specific/phantom_data.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct MyBox2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `get` are never used [INFO] [stdout] --> src/specific/phantom_data.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl MyBox2 { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 15 | /// 创建一个新的 MyBox,指向给定值的只读指针 [INFO] [stdout] 16 | pub fn new(value: &T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn get(&self) -> &T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Shape` is never used [INFO] [stdout] --> src/structural/adapter.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Shape { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LegacyRectangle` is never constructed [INFO] [stdout] --> src/structural/adapter.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct LegacyRectangle { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `draw_old` is never used [INFO] [stdout] --> src/structural/adapter.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl LegacyRectangle { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] 15 | fn draw_old(&self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RectangleAdapter` is never constructed [INFO] [stdout] --> src/structural/adapter.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct RectangleAdapter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/structural/adapter.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Renderer` is never used [INFO] [stdout] --> src/structural/bridge.rs:10:11 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait Renderer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenGLRenderer` is never constructed [INFO] [stdout] --> src/structural/bridge.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct OpenGLRenderer; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DirectXRenderer` is never constructed [INFO] [stdout] --> src/structural/bridge.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct DirectXRenderer; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Circle` is never constructed [INFO] [stdout] --> src/structural/bridge.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | pub struct Circle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `draw` are never used [INFO] [stdout] --> src/structural/bridge.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 45 | impl Circle { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn new(renderer: Box, radius: f64) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn draw(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/structural/bridge.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Component` is never used [INFO] [stdout] --> src/structural/decorator.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Component { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteComponent` is never constructed [INFO] [stdout] --> src/structural/decorator.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct ConcreteComponent; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Decorator` is never used [INFO] [stdout] --> src/structural/decorator.rs:17:11 [INFO] [stdout] | [INFO] [stdout] 17 | pub trait Decorator: Component {} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteDecoratorA` is never constructed [INFO] [stdout] --> src/structural/decorator.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct ConcreteDecoratorA { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `added_behavior` are never used [INFO] [stdout] --> src/structural/decorator.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl ConcreteDecoratorA { [INFO] [stdout] | ---------------------------------------- associated items in this implementation [INFO] [stdout] 28 | pub fn new(component: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | fn added_behavior(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/structural/decorator.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Flyweight` is never used [INFO] [stdout] --> src/structural/flyweight.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Flyweight { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcreteFlyweight` is never constructed [INFO] [stdout] --> src/structural/flyweight.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct ConcreteFlyweight { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FlyweightFactory` is never constructed [INFO] [stdout] --> src/structural/flyweight.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct FlyweightFactory { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `handle`, `get_flyweight`, and `push_flyweight` are never used [INFO] [stdout] --> src/structural/flyweight.rs:27:19 [INFO] [stdout] | [INFO] [stdout] 25 | impl FlyweightFactory { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] 26 | ///处理数据 [INFO] [stdout] 27 | pub(crate) fn handle(&mut self, s: &str) ->Option<&ConcreteFlyweight> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn get_flyweight(&mut self, intrinsic_state: &str) -> Option<&ConcreteFlyweight> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn push_flyweight(&mut self, intrinsic_state: String) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Subject` is never used [INFO] [stdout] --> src/structural/proxy.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | pub trait Subject { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RealSubject` is never constructed [INFO] [stdout] --> src/structural/proxy.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct RealSubject; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Proxy` is never constructed [INFO] [stdout] --> src/structural/proxy.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub struct Proxy{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pre_request` and `post_request` are never used [INFO] [stdout] --> src/structural/proxy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 29 | impl Proxy{ [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 30 | fn pre_request(&self){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn post_request(&self){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/creational/singleton.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | SINGLETON_INSTANCE.as_ref().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/creational/singleton2.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | SINGLETON_INSTANCE.as_ref().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/creational/singleton3.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | CONFIG_MAP.as_ref().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.44s [INFO] running `Command { std: "docker" "inspect" "89d06f105687535ec190565d2aff82972901940f5690a599d3420247fc2cb99e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89d06f105687535ec190565d2aff82972901940f5690a599d3420247fc2cb99e", kill_on_drop: false }` [INFO] [stdout] 89d06f105687535ec190565d2aff82972901940f5690a599d3420247fc2cb99e