[INFO] cloning repository https://github.com/Technologenesis/rust-wfc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Technologenesis/rust-wfc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTechnologenesis%2Frust-wfc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTechnologenesis%2Frust-wfc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c5fa788ef0eea72149c6a6e470bc87b37c2cf307 [INFO] linting Technologenesis/rust-wfc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTechnologenesis%2Frust-wfc" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-4-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/Technologenesis/rust-wfc [INFO] finished tweaking git repo https://github.com/Technologenesis/rust-wfc [INFO] tweaked toml for git repo https://github.com/Technologenesis/rust-wfc written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Technologenesis/rust-wfc on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Technologenesis/rust-wfc 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" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 82a86aa1a43d1258cec421257ba44e08c1229a848bd9fae35638167eba475a33 [INFO] running `Command { std: "docker" "start" "-a" "82a86aa1a43d1258cec421257ba44e08c1229a848bd9fae35638167eba475a33", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "82a86aa1a43d1258cec421257ba44e08c1229a848bd9fae35638167eba475a33", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82a86aa1a43d1258cec421257ba44e08c1229a848bd9fae35638167eba475a33", kill_on_drop: false }` [INFO] [stdout] 82a86aa1a43d1258cec421257ba44e08c1229a848bd9fae35638167eba475a33 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 27a43e8bd089dac01ecd0519cc5be0cc0e9be6ad6b042bb07e1fb1dc7d808428 [INFO] running `Command { std: "docker" "start" "-a" "27a43e8bd089dac01ecd0519cc5be0cc0e9be6ad6b042bb07e1fb1dc7d808428", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking cfg-if v1.0.1 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling zerocopy v0.8.26 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking slab v0.4.11 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking mio v1.1.0 [INFO] [stderr] Checking signal-hook-registry v1.4.7 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking uuid v1.18.1 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking rust-wfc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:2:13 [INFO] [stdout] | [INFO] [stdout] 2 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | base_mass: base_mass, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_mass` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Deserialize` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | Deserialize [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `grams`, `newtons`, and `self` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | self, Quantity, distance::{ [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | newtons [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | grams [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TransitiveVerbPhrase` [INFO] [stdout] --> src/world/mod.rs:9:60 [INFO] [stdout] | [INFO] [stdout] 9 | lang::{GrammaticalPerson, TransitiveVerb, verbs::ToDo, TransitiveVerbPhrase, VerbPhrase}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:2:13 [INFO] [stdout] | [INFO] [stdout] 2 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | base_mass: base_mass, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_mass` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Deserialize` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | Deserialize [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `grams`, `newtons`, and `self` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | self, Quantity, distance::{ [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | newtons [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | grams [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TransitiveVerbPhrase` [INFO] [stdout] --> src/world/mod.rs:9:60 [INFO] [stdout] | [INFO] [stdout] 9 | lang::{GrammaticalPerson, TransitiveVerb, verbs::ToDo, TransitiveVerbPhrase, VerbPhrase}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/worldobject/none.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | NoWorldObject(self.0) [INFO] [stdout] | ^^^^^^^^^^^^^ ------ any code following this expression is unreachable [INFO] [stdout] | | [INFO] [stdout] | unreachable call [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/worldobject/none.rs:139:12 [INFO] [stdout] | [INFO] [stdout] 139 | Ok(NoInventoryItem(self.0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ ------ any code following this expression is unreachable [INFO] [stdout] | | [INFO] [stdout] | unreachable call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/worldobject/none.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | NoWorldObject(self.0) [INFO] [stdout] | ^^^^^^^^^^^^^ ------ any code following this expression is unreachable [INFO] [stdout] | | [INFO] [stdout] | unreachable call [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/worldobject/none.rs:139:12 [INFO] [stdout] | [INFO] [stdout] 139 | Ok(NoInventoryItem(self.0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ ------ any code following this expression is unreachable [INFO] [stdout] | | [INFO] [stdout] | unreachable call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/rat.rs:95:32 [INFO] [stdout] | [INFO] [stdout] 95 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/rat.rs:95:62 [INFO] [stdout] | [INFO] [stdout] 95 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/rat.rs:168:38 [INFO] [stdout] | [INFO] [stdout] 168 | async fn send_message(&mut self, message: String) -> Result<(), WorldObjectError> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/none.rs:134:32 [INFO] [stdout] | [INFO] [stdout] 134 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/none.rs:134:62 [INFO] [stdout] | [INFO] [stdout] 134 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `force` [INFO] [stdout] --> src/worldobject/none.rs:154:37 [INFO] [stdout] | [INFO] [stdout] 154 | async fn apply_force(&mut self, force: &Quantity) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_force` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/none.rs:158:38 [INFO] [stdout] | [INFO] [stdout] 158 | async fn send_message(&mut self, message: String) -> Result<(), Error> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target_handle` [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:100:32 [INFO] [stdout] | [INFO] [stdout] 100 | async fn update(&mut self, target_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_target_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:100:66 [INFO] [stdout] | [INFO] [stdout] 100 | async fn update(&mut self, target_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/rat.rs:95:32 [INFO] [stdout] | [INFO] [stdout] 95 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/rat.rs:95:62 [INFO] [stdout] | [INFO] [stdout] 95 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/rat.rs:168:38 [INFO] [stdout] | [INFO] [stdout] 168 | async fn send_message(&mut self, message: String) -> Result<(), WorldObjectError> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/none.rs:134:32 [INFO] [stdout] | [INFO] [stdout] 134 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/none.rs:134:62 [INFO] [stdout] | [INFO] [stdout] 134 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `force` [INFO] [stdout] --> src/worldobject/none.rs:154:37 [INFO] [stdout] | [INFO] [stdout] 154 | async fn apply_force(&mut self, force: &Quantity) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_force` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/none.rs:158:38 [INFO] [stdout] | [INFO] [stdout] 158 | async fn send_message(&mut self, message: String) -> Result<(), Error> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target_handle` [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:100:32 [INFO] [stdout] | [INFO] [stdout] 100 | async fn update(&mut self, target_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_target_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:100:66 [INFO] [stdout] | [INFO] [stdout] 100 | async fn update(&mut self, target_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:93:32 [INFO] [stdout] | [INFO] [stdout] 93 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:93:62 [INFO] [stdout] | [INFO] [stdout] 93 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `force` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | async fn apply_force(&mut self, force: &Quantity) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_force` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:127:38 [INFO] [stdout] | [INFO] [stdout] 127 | async fn send_message(&mut self, message: String) -> Result<(), WorldObjectError> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:136:32 [INFO] [stdout] | [INFO] [stdout] 136 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:136:62 [INFO] [stdout] | [INFO] [stdout] 136 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `force` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:158:37 [INFO] [stdout] | [INFO] [stdout] 158 | async fn apply_force(&mut self, force: &Quantity) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_force` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:166:38 [INFO] [stdout] | [INFO] [stdout] 166 | async fn send_message(&mut self, message: String) -> Result<(), Error> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handle` [INFO] [stdout] --> src/world/mod.rs:179:38 [INFO] [stdout] | [INFO] [stdout] 179 | self.broadcast_by_recipient(|handle| message.clone()).await [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:93:32 [INFO] [stdout] | [INFO] [stdout] 93 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:93:62 [INFO] [stdout] | [INFO] [stdout] 93 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `force` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | async fn apply_force(&mut self, force: &Quantity) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_force` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:127:38 [INFO] [stdout] | [INFO] [stdout] 127 | async fn send_message(&mut self, message: String) -> Result<(), WorldObjectError> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_handle` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:136:32 [INFO] [stdout] | [INFO] [stdout] 136 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:136:62 [INFO] [stdout] | [INFO] [stdout] 136 | async fn update(&mut self, my_handle: WorldObjectHandle, world: &World) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `force` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:158:37 [INFO] [stdout] | [INFO] [stdout] 158 | async fn apply_force(&mut self, force: &Quantity) -> Result { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_force` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:166:38 [INFO] [stdout] | [INFO] [stdout] 166 | async fn send_message(&mut self, message: String) -> Result<(), Error> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pronoun`, `mass`, `controller`, and `controller_mut` are never used [INFO] [stdout] --> src/worldobject/mod.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait TypedWorldObject: Send { [INFO] [stdout] | ---------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 47 | fn pronoun(&self) -> String; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn mass(&self) -> Quantity; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 62 | fn controller(&self) -> Result<&dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 63 | fn controller_mut(&mut self) -> Result<&mut dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pronoun`, `mass`, `controller`, and `controller_mut` are never used [INFO] [stdout] --> src/worldobject/mod.rs:159:8 [INFO] [stdout] | [INFO] [stdout] 153 | pub trait WorldObject: Send + Sync { [INFO] [stdout] | ----------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 159 | fn pronoun(&self) -> String; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 162 | fn mass(&self) -> Quantity; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 180 | fn controller(&self) -> Result<&dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 181 | fn controller_mut(&mut self) -> Result<&mut dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `wielded_items` is never used [INFO] [stdout] --> src/worldobject/human/mod.rs:194:12 [INFO] [stdout] | [INFO] [stdout] 193 | impl Human { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 194 | pub fn wielded_items<'a>(&'a self) -> impl Iterator { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `AttackError` is never used [INFO] [stdout] --> src/worldobject/human/actions/attack_action.rs:28:10 [INFO] [stdout] | [INFO] [stdout] 28 | pub enum AttackError { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get` and `get_mut` are never used [INFO] [stdout] --> src/worldobject/components/inventory/mod.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl Inventory { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn get(&self, handle: &InventoryItemHandle) -> Option<&Box> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn get_mut(&mut self, handle: &InventoryItemHandle) -> Option<&mut Box> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `FailedToSetController` and `FailedToTakeController` are never constructed [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 126 | pub enum WandUseError { [INFO] [stdout] | ------------ variants in this enum [INFO] [stdout] ... [INFO] [stdout] 130 | FailedToSetController(Box), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 131 | FailedToTakeController(Box), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `WandUseError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `AttackError` is never used [INFO] [stdout] --> src/worldobject/components/controllers/commands/attack_command.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | pub enum AttackError { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InvalidItemName` is never constructed [INFO] [stdout] --> src/worldobject/components/controllers/commands/use_command.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub enum UseCommandParseError { [INFO] [stdout] | -------------------- variant in this enum [INFO] [stdout] 18 | NoItemNameProvided, [INFO] [stdout] 19 | InvalidItemName(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UseCommandParseError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `subject_pronoun` and `object_pronoun` are never used [INFO] [stdout] --> src/worldobject/components/gender/mod.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 33 | impl Gender { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn subject_pronoun(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub fn object_pronoun(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/mod.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl Body { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 28 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Head { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 19 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 47 | impl Mouth { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 48 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 77 | impl Tooth { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 78 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/torso/mod.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl Torso { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 25 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `HandDeserializeError` is never constructed [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct HandDeserializeError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/legs/mod.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Legs { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 16 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `NoSuchObject` and `ErrorSendingMessage` are never constructed [INFO] [stdout] --> src/world/mod.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 67 | pub enum WorldObjectSendMessageError { [INFO] [stdout] | --------------------------- variants in this enum [INFO] [stdout] 68 | NoSuchObject(WorldObjectHandle), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 69 | ErrorSendingMessage(Box) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `WorldObjectSendMessageError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `send_message_to` is never used [INFO] [stdout] --> src/world/mod.rs:152:18 [INFO] [stdout] | [INFO] [stdout] 100 | impl World { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 152 | pub async fn send_message_to(&mut self, handle: &WorldObjectHandle, message: String) -> Result<(), WorldObjectSendMessageError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Bronze` and `Steel` are never constructed [INFO] [stdout] --> src/materials/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum Material { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 5 | Bronze, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 6 | Iron, [INFO] [stdout] 7 | Steel, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Material` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `centimeters` is never used [INFO] [stdout] --> src/quantities/distance.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn centimeters(n: f64) -> quantities::Quantity { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Area` is never used [INFO] [stdout] --> src/quantities/area.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | pub type Area = product::Product; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `square_meters` is never used [INFO] [stdout] --> src/quantities/area.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn square_meters(n: f64) -> quantities::Quantity { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Volume` is never used [INFO] [stdout] --> src/quantities/volume.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | pub type Volume = product::Product; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Density` is never used [INFO] [stdout] --> src/quantities/density.rs:6:10 [INFO] [stdout] | [INFO] [stdout] 6 | pub type Density = product::Product>; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/quantities/direction/mod.rs:63:42 [INFO] [stdout] | [INFO] [stdout] 63 | pub struct InvalidVerticalDirectionError(String); [INFO] [stdout] | ----------------------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `InvalidVerticalDirectionError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Debug`, `Warning`, and `Fatal` are never constructed [INFO] [stdout] --> src/logging/mod.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub enum LogLevel { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 20 | Debug, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 21 | Info, [INFO] [stdout] 22 | Warning, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | Error, [INFO] [stdout] 24 | Fatal [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `debug`, `warn`, `fatal`, `underlying`, `basic`, and `noop` are never used [INFO] [stdout] --> src/logging/mod.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 63 | impl Logger { [INFO] [stdout] | --------------------------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 68 | pub async fn debug(&mut self, message: String) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | pub async fn warn(&mut self, message: String) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub async fn fatal(&mut self, message: String) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn underlying(self) -> L { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | pub fn basic(out: Out) -> BasicLogger { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | pub fn noop() -> NoopLogger { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_kwarg` is never used [INFO] [stdout] --> src/logging/format.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl FormatLoggerImpl { [INFO] [stdout] | --------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn set_kwarg(&mut self, key: String, value: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ToUse` is never constructed [INFO] [stdout] --> src/lang/verbs.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 152 | pub struct ToUse; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CloneBox` is never used [INFO] [stdout] --> src/util/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait CloneBox { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `HostError` is never used [INFO] [stdout] --> src/lobby/mod.rs:36:10 [INFO] [stdout] | [INFO] [stdout] 36 | pub enum HostError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/move_action.rs:43:34 [INFO] [stdout] | [INFO] [stdout] 43 | .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/worldobject/human/actions/move_action.rs:45:36 [INFO] [stdout] | [INFO] [stdout] 45 | let dist_f64 = (&cmd.distance / &meters(1.0)).cancel().0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 45 - let dist_f64 = (&cmd.distance / &meters(1.0)).cancel().0.0; [INFO] [stdout] 45 + let dist_f64 = (cmd.distance / meters(1.0)).cancel().0.0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/interact_action.rs:36:38 [INFO] [stdout] | [INFO] [stdout] 36 | ... .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/interact_action.rs:56:34 [INFO] [stdout] | [INFO] [stdout] 56 | .map_err(|err| InteractCommandToActionError::FailedToGetTargetObject(err))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `InteractCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/worldobject/human/actions/collect_action.rs:35:46 [INFO] [stdout] | [INFO] [stdout] 35 | let inventory_item = object.collect().await [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 36 | | .or_else(|(err, og_object)| { [INFO] [stdout] 37 | | world.add_object(target_handle, og_object, location); [INFO] [stdout] 38 | | Err(err) [INFO] [stdout] 39 | | })?; [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: use `map_err` instead [INFO] [stdout] | [INFO] [stdout] 36 ~ .map_err(|(err, og_object)| { [INFO] [stdout] 37 | world.add_object(target_handle, og_object, location); [INFO] [stdout] 38 ~ err [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/collect_action.rs:42:38 [INFO] [stdout] | [INFO] [stdout] 42 | ... .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/collect_action.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | .map_err(|err| CollectCommandToActionError::FailedToGetTargetObject(err))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `CollectCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/attack_action.rs:45:18 [INFO] [stdout] | [INFO] [stdout] 45 | .map_err(|err| AttackCommandToActionError::FailedToGetTargetObject(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AttackCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/attack_action.rs:59:34 [INFO] [stdout] | [INFO] [stdout] 59 | .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/examine_action.rs:31:18 [INFO] [stdout] | [INFO] [stdout] 31 | .map_err(|err| ExamineCommandToActionError::FailedToGetTargetObject(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ExamineCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/worldobject/human/actions/circumspect_action.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 17 | format!("you see nothing around you") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"you see nothing around you".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/worldobject/human/actions/inventory_action.rs:16:29 [INFO] [stdout] | [INFO] [stdout] 16 | Ok(Some(format!( [INFO] [stdout] | _____________________________^ [INFO] [stdout] 17 | | "{}\n{}\n{}", [INFO] [stdout] 18 | | { [INFO] [stdout] 19 | | let handles_and_descriptions = me.inventory()?.0.iter() [INFO] [stdout] ... | [INFO] [stdout] 36 | | ), [INFO] [stdout] 37 | | ))) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/worldobject/human/actions/inventory_action.rs:24:33 [INFO] [stdout] | [INFO] [stdout] 24 | ... format!("you are carrying nothing") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"you are carrying nothing".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handle` [INFO] [stdout] --> src/world/mod.rs:179:38 [INFO] [stdout] | [INFO] [stdout] 179 | self.broadcast_by_recipient(|handle| message.clone()).await [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/use_action.rs:30:72 [INFO] [stdout] | [INFO] [stdout] 30 | wielded_item.use_item(world, my_handle, cmd.target_handle).map_err(|err| UseCommandToActionError::FailedToUseItem(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `UseCommandToActionError::FailedToUseItem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `CommandToActionError` [INFO] [stdout] --> src/worldobject/human/actions/mod.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | / pub enum CommandToActionError { [INFO] [stdout] 26 | | AttackCommandToActionError(AttackCommandToActionError), [INFO] [stdout] 27 | | InteractCommandToActionError(InteractCommandToActionError), [INFO] [stdout] 28 | | CollectCommandToActionError(CollectCommandToActionError), [INFO] [stdout] ... | [INFO] [stdout] 31 | | UseCommandToActionError(UseCommandToActionError), [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/worldobject/human/actions/mod.rs:50:25 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn from_command(&mut self, cmd: Command, world: &World, my_handle: WorldObjectHandle) -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Gender` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/human/mod.rs:117:21 [INFO] [stdout] | [INFO] [stdout] 117 | gender: self.gender.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.gender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DirectionHorizontal` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/human/mod.rs:119:27 [INFO] [stdout] | [INFO] [stdout] 119 | dominant_arm: self.dominant_arm.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dominant_arm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/worldobject/human/mod.rs:194:26 [INFO] [stdout] | [INFO] [stdout] 194 | pub fn wielded_items<'a>(&'a self) -> impl Iterator { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 194 - pub fn wielded_items<'a>(&'a self) -> impl Iterator { [INFO] [stdout] 194 + pub fn wielded_items(&self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/worldobject/human/mod.rs:200:30 [INFO] [stdout] | [INFO] [stdout] 200 | pub fn wielded_items_mut<'a>(&'a mut self) -> impl Iterator { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 200 - pub fn wielded_items_mut<'a>(&'a mut self) -> impl Iterator { [INFO] [stdout] 200 + pub fn wielded_items_mut(&mut self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/mod.rs:226:46 [INFO] [stdout] | [INFO] [stdout] 226 | ...nder").map(|v| Gender::try_from(v)).transpose().map_err(|_| "gender not found")?.ok_or("gender not found")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Gender::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/mod.rs:228:58 [INFO] [stdout] | [INFO] [stdout] 228 | ..._arm = value.get("dominant_arm").map(|v| DirectionHorizontal::try_from(v)).transpose().map_err(|err| format!("failed to parse do... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DirectionHorizontal::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/rat.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return Err(Box::new(RatUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 82 - return Err(Box::new(RatUseError)); [INFO] [stdout] 82 + Err(Box::new(RatUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/inventory/item/none.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | return Err(Box::new(NoInventoryItemUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 126 - return Err(Box::new(NoInventoryItemUseError)); [INFO] [stdout] 126 + Err(Box::new(NoInventoryItemUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Quantity` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/components/inventory/item/sword.rs:86:49 [INFO] [stdout] | [INFO] [stdout] 86 | Sword { mass: self.mass.clone(), reach: self.reach.clone(), material: self.material.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.reach` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/worldobject/components/inventory/item/sword.rs:90:84 [INFO] [stdout] | [INFO] [stdout] 90 | format!("a sword forged from {} with a reach of {} meters", self.material, (&self.reach / &meters(1.0)).cancel()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 90 - format!("a sword forged from {} with a reach of {} meters", self.material, (&self.reach / &meters(1.0)).cancel()) [INFO] [stdout] 90 + format!("a sword forged from {} with a reach of {} meters", self.material, (self.reach / meters(1.0)).cancel()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/inventory/item/sword.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | return Err(Box::new(SwordUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - return Err(Box::new(SwordUseError)); [INFO] [stdout] 156 + Err(Box::new(SwordUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:155:49 [INFO] [stdout] | [INFO] [stdout] 155 | .and_then(|handle| world.get_object(&handle) [INFO] [stdout] | ^^^^^^^ help: change this to: `handle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/worldobject/components/inventory/mod.rs:39:63 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn get(&self, handle: &InventoryItemHandle) -> Option<&Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn InventoryItem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/worldobject/components/controllers/net/controller/mod.rs:58:69 [INFO] [stdout] | [INFO] [stdout] 58 | self.logger.info(format!("Received action: {}", json.to_string())).await; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/interact_action.rs:33:29 [INFO] [stdout] | [INFO] [stdout] 33 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 33 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 33 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/collect_command.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 31 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 31 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/attack_command.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 46 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 46 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/examine_command.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 31 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 31 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pronoun`, `mass`, `controller`, and `controller_mut` are never used [INFO] [stdout] --> src/worldobject/mod.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait TypedWorldObject: Send { [INFO] [stdout] | ---------------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 47 | fn pronoun(&self) -> String; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn mass(&self) -> Quantity; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 62 | fn controller(&self) -> Result<&dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 63 | fn controller_mut(&mut self) -> Result<&mut dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `pronoun`, `mass`, `controller`, and `controller_mut` are never used [INFO] [stdout] --> src/worldobject/mod.rs:159:8 [INFO] [stdout] | [INFO] [stdout] 153 | pub trait WorldObject: Send + Sync { [INFO] [stdout] | ----------- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 159 | fn pronoun(&self) -> String; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 162 | fn mass(&self) -> Quantity; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 180 | fn controller(&self) -> Result<&dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 181 | fn controller_mut(&mut self) -> Result<&mut dyn Controller, Error>; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `wielded_items` is never used [INFO] [stdout] --> src/worldobject/human/mod.rs:194:12 [INFO] [stdout] | [INFO] [stdout] 193 | impl Human { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 194 | pub fn wielded_items<'a>(&'a self) -> impl Iterator { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `AttackError` is never used [INFO] [stdout] --> src/worldobject/human/actions/attack_action.rs:28:10 [INFO] [stdout] | [INFO] [stdout] 28 | pub enum AttackError { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get` and `get_mut` are never used [INFO] [stdout] --> src/worldobject/components/inventory/mod.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl Inventory { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn get(&self, handle: &InventoryItemHandle) -> Option<&Box> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn get_mut(&mut self, handle: &InventoryItemHandle) -> Option<&mut Box> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/controllers/commands/wield_command.rs:34:26 [INFO] [stdout] | [INFO] [stdout] 34 | .map_err(|err| WieldCommandParseError::InvalidItemHandle(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `WieldCommandParseError::InvalidItemHandle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `FailedToSetController` and `FailedToTakeController` are never constructed [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 126 | pub enum WandUseError { [INFO] [stdout] | ------------ variants in this enum [INFO] [stdout] ... [INFO] [stdout] 130 | FailedToSetController(Box), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 131 | FailedToTakeController(Box), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `WandUseError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `AttackError` is never used [INFO] [stdout] --> src/worldobject/components/controllers/commands/attack_command.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | pub enum AttackError { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InvalidItemName` is never constructed [INFO] [stdout] --> src/worldobject/components/controllers/commands/use_command.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub enum UseCommandParseError { [INFO] [stdout] | -------------------- variant in this enum [INFO] [stdout] 18 | NoItemNameProvided, [INFO] [stdout] 19 | InvalidItemName(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UseCommandParseError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `subject_pronoun` and `object_pronoun` are never used [INFO] [stdout] --> src/worldobject/components/gender/mod.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 33 | impl Gender { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 42 | pub fn subject_pronoun(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub fn object_pronoun(&self) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/mod.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl Body { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 28 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl Head { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 19 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 47 | impl Mouth { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 48 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 77 | impl Tooth { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 78 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/torso/mod.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 24 | impl Torso { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 25 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `HandDeserializeError` is never constructed [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct HandDeserializeError; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mass` is never used [INFO] [stdout] --> src/worldobject/components/body/legs/mod.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Legs { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 16 | pub fn mass(&self) -> Quantity { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `NoSuchObject` and `ErrorSendingMessage` are never constructed [INFO] [stdout] --> src/world/mod.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 67 | pub enum WorldObjectSendMessageError { [INFO] [stdout] | --------------------------- variants in this enum [INFO] [stdout] 68 | NoSuchObject(WorldObjectHandle), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 69 | ErrorSendingMessage(Box) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `WorldObjectSendMessageError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `send_message_to` is never used [INFO] [stdout] --> src/world/mod.rs:152:18 [INFO] [stdout] | [INFO] [stdout] 100 | impl World { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 152 | pub async fn send_message_to(&mut self, handle: &WorldObjectHandle, message: String) -> Result<(), WorldObjectSendMessageError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Bronze` and `Steel` are never constructed [INFO] [stdout] --> src/materials/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum Material { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 5 | Bronze, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 6 | Iron, [INFO] [stdout] 7 | Steel, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Material` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `centimeters` is never used [INFO] [stdout] --> src/quantities/distance.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn centimeters(n: f64) -> quantities::Quantity { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Area` is never used [INFO] [stdout] --> src/quantities/area.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | pub type Area = product::Product; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `square_meters` is never used [INFO] [stdout] --> src/quantities/area.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn square_meters(n: f64) -> quantities::Quantity { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Volume` is never used [INFO] [stdout] --> src/quantities/volume.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | pub type Volume = product::Product; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Density` is never used [INFO] [stdout] --> src/quantities/density.rs:6:10 [INFO] [stdout] | [INFO] [stdout] 6 | pub type Density = product::Product>; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/quantities/direction/mod.rs:63:42 [INFO] [stdout] | [INFO] [stdout] 63 | pub struct InvalidVerticalDirectionError(String); [INFO] [stdout] | ----------------------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `InvalidVerticalDirectionError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Debug`, `Warning`, and `Fatal` are never constructed [INFO] [stdout] --> src/logging/mod.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 19 | pub enum LogLevel { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 20 | Debug, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 21 | Info, [INFO] [stdout] 22 | Warning, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | Error, [INFO] [stdout] 24 | Fatal [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `debug`, `warn`, `fatal`, `underlying`, `basic`, and `noop` are never used [INFO] [stdout] --> src/logging/mod.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 63 | impl Logger { [INFO] [stdout] | --------------------------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 68 | pub async fn debug(&mut self, message: String) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | pub async fn warn(&mut self, message: String) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub async fn fatal(&mut self, message: String) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | pub fn underlying(self) -> L { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | pub fn basic(out: Out) -> BasicLogger { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | pub fn noop() -> NoopLogger { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_kwarg` is never used [INFO] [stdout] --> src/logging/format.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl FormatLoggerImpl { [INFO] [stdout] | --------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn set_kwarg(&mut self, key: String, value: String) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ToUse` is never constructed [INFO] [stdout] --> src/lang/verbs.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 152 | pub struct ToUse; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `CloneBox` is never used [INFO] [stdout] --> src/util/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait CloneBox { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `HostError` is never used [INFO] [stdout] --> src/lobby/mod.rs:36:10 [INFO] [stdout] | [INFO] [stdout] 36 | pub enum HostError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/move_action.rs:43:34 [INFO] [stdout] | [INFO] [stdout] 43 | .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/worldobject/human/actions/move_action.rs:45:36 [INFO] [stdout] | [INFO] [stdout] 45 | let dist_f64 = (&cmd.distance / &meters(1.0)).cancel().0.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 45 - let dist_f64 = (&cmd.distance / &meters(1.0)).cancel().0.0; [INFO] [stdout] 45 + let dist_f64 = (cmd.distance / meters(1.0)).cancel().0.0; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/controllers/commands/use_command.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|handle| WorldObjectHandle::try_from(handle)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `WorldObjectHandle::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/use_command.rs:37:27 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|handle| WorldObjectHandle::try_from(handle)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 37 - .map(|handle| WorldObjectHandle::try_from(handle)) [INFO] [stdout] 37 + .map(|handle| From::from(handle)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/interact_action.rs:36:38 [INFO] [stdout] | [INFO] [stdout] 36 | ... .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/interact_action.rs:56:34 [INFO] [stdout] | [INFO] [stdout] 56 | .map_err(|err| InteractCommandToActionError::FailedToGetTargetObject(err))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `InteractCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/worldobject/human/actions/collect_action.rs:35:46 [INFO] [stdout] | [INFO] [stdout] 35 | let inventory_item = object.collect().await [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 36 | | .or_else(|(err, og_object)| { [INFO] [stdout] 37 | | world.add_object(target_handle, og_object, location); [INFO] [stdout] 38 | | Err(err) [INFO] [stdout] 39 | | })?; [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: use `map_err` instead [INFO] [stdout] | [INFO] [stdout] 36 ~ .map_err(|(err, og_object)| { [INFO] [stdout] 37 | world.add_object(target_handle, og_object, location); [INFO] [stdout] 38 ~ err [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/collect_action.rs:42:38 [INFO] [stdout] | [INFO] [stdout] 42 | ... .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/collect_action.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | .map_err(|err| CollectCommandToActionError::FailedToGetTargetObject(err))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `CollectCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/attack_action.rs:45:18 [INFO] [stdout] | [INFO] [stdout] 45 | .map_err(|err| AttackCommandToActionError::FailedToGetTargetObject(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AttackCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/attack_action.rs:59:34 [INFO] [stdout] | [INFO] [stdout] 59 | .map_err(|err| Box::new(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Box::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/examine_action.rs:31:18 [INFO] [stdout] | [INFO] [stdout] 31 | .map_err(|err| ExamineCommandToActionError::FailedToGetTargetObject(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `ExamineCommandToActionError::FailedToGetTargetObject` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/worldobject/human/actions/circumspect_action.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 17 | format!("you see nothing around you") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"you see nothing around you".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/worldobject/human/actions/inventory_action.rs:16:29 [INFO] [stdout] | [INFO] [stdout] 16 | Ok(Some(format!( [INFO] [stdout] | _____________________________^ [INFO] [stdout] 17 | | "{}\n{}\n{}", [INFO] [stdout] 18 | | { [INFO] [stdout] 19 | | let handles_and_descriptions = me.inventory()?.0.iter() [INFO] [stdout] ... | [INFO] [stdout] 36 | | ), [INFO] [stdout] 37 | | ))) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/worldobject/human/actions/inventory_action.rs:24:33 [INFO] [stdout] | [INFO] [stdout] 24 | ... format!("you are carrying nothing") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"you are carrying nothing".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:65:114 [INFO] [stdout] | [INFO] [stdout] 65 | ...er().map(|tooth| Tooth::try_from(tooth)).collect::, String>>()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Tooth::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Quantity` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | length: self.length.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/actions/use_action.rs:30:72 [INFO] [stdout] | [INFO] [stdout] 30 | wielded_item.use_item(world, my_handle, cmd.target_handle).map_err(|err| UseCommandToActionError::FailedToUseItem(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `UseCommandToActionError::FailedToUseItem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `CommandToActionError` [INFO] [stdout] --> src/worldobject/human/actions/mod.rs:25:1 [INFO] [stdout] | [INFO] [stdout] 25 | / pub enum CommandToActionError { [INFO] [stdout] 26 | | AttackCommandToActionError(AttackCommandToActionError), [INFO] [stdout] 27 | | InteractCommandToActionError(InteractCommandToActionError), [INFO] [stdout] 28 | | CollectCommandToActionError(CollectCommandToActionError), [INFO] [stdout] ... | [INFO] [stdout] 31 | | UseCommandToActionError(UseCommandToActionError), [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:87:50 [INFO] [stdout] | [INFO] [stdout] 87 | |held_item| InventoryItem::dummy(&*held_item) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 87 - |held_item| InventoryItem::dummy(&*held_item) [INFO] [stdout] 87 + |held_item| InventoryItem::dummy(held_item) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 87 | |held_item| InventoryItem::dummy(&**held_item) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/worldobject/human/actions/mod.rs:50:25 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn from_command(&mut self, cmd: Command, world: &World, my_handle: WorldObjectHandle) -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:169:9 [INFO] [stdout] | [INFO] [stdout] 169 | return Err(Box::new(HandUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 169 - return Err(Box::new(HandUseError)); [INFO] [stdout] 169 + Err(Box::new(HandUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:173:6 [INFO] [stdout] | [INFO] [stdout] 173 | impl<'de> TryFrom<&serde_json::Value> for Hand { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:95:42 [INFO] [stdout] | [INFO] [stdout] 95 | ...d").map(|v| hand::Hand::try_from(v)).transpose().map_err(|err| format!("failed to parse hand: {}", err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `hand::Hand::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Quantity` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:128:20 [INFO] [stdout] | [INFO] [stdout] 128 | reach: self.reach.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.reach` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:131:64 [INFO] [stdout] | [INFO] [stdout] 131 | |hand| ::dummy(&hand) [INFO] [stdout] | ^^^^^ help: change this to: `hand` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Gender` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/human/mod.rs:117:21 [INFO] [stdout] | [INFO] [stdout] 117 | gender: self.gender.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.gender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `DirectionHorizontal` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/human/mod.rs:119:27 [INFO] [stdout] | [INFO] [stdout] 119 | dominant_arm: self.dominant_arm.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.dominant_arm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | return Err(Box::new(ArmUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 208 - return Err(Box::new(ArmUseError)); [INFO] [stdout] 208 + Err(Box::new(ArmUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/worldobject/human/mod.rs:194:26 [INFO] [stdout] | [INFO] [stdout] 194 | pub fn wielded_items<'a>(&'a self) -> impl Iterator { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 194 - pub fn wielded_items<'a>(&'a self) -> impl Iterator { [INFO] [stdout] 194 + pub fn wielded_items(&self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/worldobject/human/mod.rs:200:30 [INFO] [stdout] | [INFO] [stdout] 200 | pub fn wielded_items_mut<'a>(&'a mut self) -> impl Iterator { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 200 - pub fn wielded_items_mut<'a>(&'a mut self) -> impl Iterator { [INFO] [stdout] 200 + pub fn wielded_items_mut(&mut self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/mod.rs:226:46 [INFO] [stdout] | [INFO] [stdout] 226 | ...nder").map(|v| Gender::try_from(v)).transpose().map_err(|_| "gender not found")?.ok_or("gender not found")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Gender::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/human/mod.rs:228:58 [INFO] [stdout] | [INFO] [stdout] 228 | ..._arm = value.get("dominant_arm").map(|v| DirectionHorizontal::try_from(v)).transpose().map_err(|err| format!("failed to parse do... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DirectionHorizontal::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/rat.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return Err(Box::new(RatUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 82 - return Err(Box::new(RatUseError)); [INFO] [stdout] 82 + Err(Box::new(RatUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/worldobject/fns/update.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | pub exec: Box BoxFuture< [INFO] [stdout] | _______________^ [INFO] [stdout] 15 | | Result, Error> [INFO] [stdout] 16 | | >>, [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:86:55 [INFO] [stdout] | [INFO] [stdout] 86 | ::definite_description(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:90:57 [INFO] [stdout] | [INFO] [stdout] 90 | ::indefinite_description(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:94:42 [INFO] [stdout] | [INFO] [stdout] 94 | ::pronoun(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:112:44 [INFO] [stdout] | [INFO] [stdout] 112 | ::inventory(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/world/coord.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / match &direction { [INFO] [stdout] 28 | | &DirectionHorizontalOrVertical::Vertical(vertical_direction) => { [INFO] [stdout] 29 | | match vertical_direction { [INFO] [stdout] 30 | | DirectionVertical::Up => self.y = &self.y + distance, [INFO] [stdout] ... | [INFO] [stdout] 39 | | }, [INFO] [stdout] 40 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ match direction { [INFO] [stdout] 28 ~ DirectionHorizontalOrVertical::Vertical(vertical_direction) => { [INFO] [stdout] 29 | match vertical_direction { [INFO] [stdout] ... [INFO] [stdout] 33 | }, [INFO] [stdout] 34 ~ DirectionHorizontalOrVertical::Horizontal(horizontal_direction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/inventory/item/none.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | return Err(Box::new(NoInventoryItemUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 126 - return Err(Box::new(NoInventoryItemUseError)); [INFO] [stdout] 126 + Err(Box::new(NoInventoryItemUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Quantity` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/components/inventory/item/sword.rs:86:49 [INFO] [stdout] | [INFO] [stdout] 86 | Sword { mass: self.mass.clone(), reach: self.reach.clone(), material: self.material.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.reach` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/worldobject/components/inventory/item/sword.rs:90:84 [INFO] [stdout] | [INFO] [stdout] 90 | format!("a sword forged from {} with a reach of {} meters", self.material, (&self.reach / &meters(1.0)).cancel()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 90 - format!("a sword forged from {} with a reach of {} meters", self.material, (&self.reach / &meters(1.0)).cancel()) [INFO] [stdout] 90 + format!("a sword forged from {} with a reach of {} meters", self.material, (self.reach / meters(1.0)).cancel()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/inventory/item/sword.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | return Err(Box::new(SwordUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - return Err(Box::new(SwordUseError)); [INFO] [stdout] 156 + Err(Box::new(SwordUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/world/mod.rs:223:39 [INFO] [stdout] | [INFO] [stdout] 223 | match self.get_object_mut(&handle) { [INFO] [stdout] | ^^^^^^^ help: change this to: `handle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/components/inventory/item/wand.rs:155:49 [INFO] [stdout] | [INFO] [stdout] 155 | .and_then(|handle| world.get_object(&handle) [INFO] [stdout] | ^^^^^^^ help: change this to: `handle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `WorldCoord` which implements the `Copy` trait [INFO] [stdout] --> src/world/mod.rs:297:92 [INFO] [stdout] | [INFO] [stdout] 297 | objects: self.objects.iter().map(|(handle, (coord, object))| (handle.clone(), (coord.clone(), object.dummy()))).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/worldobject/components/inventory/mod.rs:39:63 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn get(&self, handle: &InventoryItemHandle) -> Option<&Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn InventoryItem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/worldobject/components/controllers/net/controller/mod.rs:58:69 [INFO] [stdout] | [INFO] [stdout] 58 | self.logger.info(format!("Received action: {}", json.to_string())).await; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/interact_action.rs:33:29 [INFO] [stdout] | [INFO] [stdout] 33 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 33 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 33 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> src/quantities/mod.rs:78:40 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Quantity>(pub T); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `T` cannot be unsized because of the bound [INFO] [stdout] --> src/quantities/mod.rs:78:24 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Quantity>(pub T); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `QuantityTrait` has the bound `Clone` [INFO] [stdout] = note: ...because `Clone` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] = note: `#[warn(clippy::needless_maybe_sized)]` on by default [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 78 - pub struct Quantity>(pub T); [INFO] [stdout] 78 + pub struct Quantity>(pub T); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/collect_command.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 31 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 31 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> src/quantities/mod.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | impl> TryFrom for Quantity [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `T` cannot be unsized because of the bound [INFO] [stdout] --> src/quantities/mod.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | impl> TryFrom for Quantity [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `QuantityTrait` has the bound `Clone` [INFO] [stdout] = note: ...because `Clone` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 80 - impl> TryFrom for Quantity [INFO] [stdout] 80 + impl> TryFrom for Quantity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/quantities/mod.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | (&uncancelled * &q2_ratio).cancel() [INFO] [stdout] | ^^^^^^^^^^^^^^^^---------^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `q2_ratio` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/quantities/mod.rs:203:25 [INFO] [stdout] | [INFO] [stdout] 203 | (&uncancelled * &q2_ratio).cancel() [INFO] [stdout] | ^^^^^^^^^ help: change this to: `q2_ratio` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/attack_command.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 46 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 46 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/logging/format.rs:36:68 [INFO] [stdout] | [INFO] [stdout] 36 | formatted = formatted.replace(&format!("{{{}}}", key), &value); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/examine_command.rs:31:29 [INFO] [stdout] | [INFO] [stdout] 31 | let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 31 - let target_handle = WorldObjectHandle::try_from(target_handle) [INFO] [stdout] 31 + let target_handle = From::from(target_handle) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/controllers/commands/wield_command.rs:34:26 [INFO] [stdout] | [INFO] [stdout] 34 | .map_err(|err| WieldCommandParseError::InvalidItemHandle(err)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `WieldCommandParseError::InvalidItemHandle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/logging/mod.rs:100:19 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn to_dyn(self) -> DynLogger { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/controllers/commands/use_command.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|handle| WorldObjectHandle::try_from(handle)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `WorldObjectHandle::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/worldobject/components/controllers/commands/use_command.rs:37:27 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|handle| WorldObjectHandle::try_from(handle)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `&str` to `String` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 37 - .map(|handle| WorldObjectHandle::try_from(handle)) [INFO] [stdout] 37 + .map(|handle| From::from(handle)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lang/mod.rs:31:125 [INFO] [stdout] | [INFO] [stdout] 31 | ...rase.conjugate(person), verb.prepositional_phrase.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:37:11 [INFO] [stdout] | [INFO] [stdout] 37 | while !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:48:11 [INFO] [stdout] | [INFO] [stdout] 48 | while !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:55:11 [INFO] [stdout] | [INFO] [stdout] 55 | while !gender_res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `gender_res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:59:15 [INFO] [stdout] | [INFO] [stdout] 59 | while !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/lobby/mod.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / pub enum HostError { [INFO] [stdout] 37 | | AddCharacterError(Box), [INFO] [stdout] 38 | | ListenerError(Box), [INFO] [stdout] 39 | | RegisterConnectionError(Box), [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lobby/mod.rs:63:31 [INFO] [stdout] | [INFO] [stdout] 63 | .map_err(|e| Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string())))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 63 - .map_err(|e| Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string())))?; [INFO] [stdout] 63 + .map_err(|e| Box::new(std::io::Error::other(e.to_string())))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lobby/mod.rs:75:47 [INFO] [stdout] | [INFO] [stdout] 75 | Err(e) => return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 75 - Err(e) => return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))), [INFO] [stdout] 75 + Err(e) => return Err(Box::new(std::io::Error::other(e.to_string()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/lobby/mod.rs:130:22 [INFO] [stdout] | [INFO] [stdout] 130 | fn add_character<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:65:114 [INFO] [stdout] | [INFO] [stdout] 65 | ...er().map(|tooth| Tooth::try_from(tooth)).collect::, String>>()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Tooth::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Quantity` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/components/body/head/mod.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | length: self.length.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:87:50 [INFO] [stdout] | [INFO] [stdout] 87 | |held_item| InventoryItem::dummy(&*held_item) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 87 - |held_item| InventoryItem::dummy(&*held_item) [INFO] [stdout] 87 + |held_item| InventoryItem::dummy(held_item) [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 87 | |held_item| InventoryItem::dummy(&**held_item) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:169:9 [INFO] [stdout] | [INFO] [stdout] 169 | return Err(Box::new(HandUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 169 - return Err(Box::new(HandUseError)); [INFO] [stdout] 169 + Err(Box::new(HandUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/worldobject/components/body/torso/arm/hand.rs:173:6 [INFO] [stdout] | [INFO] [stdout] 173 | impl<'de> TryFrom<&serde_json::Value> for Hand { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:95:42 [INFO] [stdout] | [INFO] [stdout] 95 | ...d").map(|v| hand::Hand::try_from(v)).transpose().map_err(|err| format!("failed to parse hand: {}", err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `hand::Hand::try_from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lobby/mod.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | lobby.register_connection(stream, socket_addr).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 73 | let _ = lobby.register_connection(stream, socket_addr).await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Quantity` which implements the `Copy` trait [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:128:20 [INFO] [stdout] | [INFO] [stdout] 128 | reach: self.reach.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.reach` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:131:64 [INFO] [stdout] | [INFO] [stdout] 131 | |hand| ::dummy(&hand) [INFO] [stdout] | ^^^^^ help: change this to: `hand` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/worldobject/components/body/torso/arm/mod.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | return Err(Box::new(ArmUseError)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 208 - return Err(Box::new(ArmUseError)); [INFO] [stdout] 208 + Err(Box::new(ArmUseError)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `async_trait_bounds` is declared but not used [INFO] [stdout] --> src/main.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | #![feature(async_trait_bounds)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/worldobject/fns/update.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | pub exec: Box BoxFuture< [INFO] [stdout] | _______________^ [INFO] [stdout] 15 | | Result, Error> [INFO] [stdout] 16 | | >>, [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:86:55 [INFO] [stdout] | [INFO] [stdout] 86 | ::definite_description(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:90:57 [INFO] [stdout] | [INFO] [stdout] 90 | ::indefinite_description(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:94:42 [INFO] [stdout] | [INFO] [stdout] 94 | ::pronoun(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/worldobject/mod.rs:112:44 [INFO] [stdout] | [INFO] [stdout] 112 | ::inventory(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/world/coord.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / match &direction { [INFO] [stdout] 28 | | &DirectionHorizontalOrVertical::Vertical(vertical_direction) => { [INFO] [stdout] 29 | | match vertical_direction { [INFO] [stdout] 30 | | DirectionVertical::Up => self.y = &self.y + distance, [INFO] [stdout] ... | [INFO] [stdout] 39 | | }, [INFO] [stdout] 40 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ match direction { [INFO] [stdout] 28 ~ DirectionHorizontalOrVertical::Vertical(vertical_direction) => { [INFO] [stdout] 29 | match vertical_direction { [INFO] [stdout] ... [INFO] [stdout] 33 | }, [INFO] [stdout] 34 ~ DirectionHorizontalOrVertical::Horizontal(horizontal_direction) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/world/mod.rs:223:39 [INFO] [stdout] | [INFO] [stdout] 223 | match self.get_object_mut(&handle) { [INFO] [stdout] | ^^^^^^^ help: change this to: `handle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `WorldCoord` which implements the `Copy` trait [INFO] [stdout] --> src/world/mod.rs:297:92 [INFO] [stdout] | [INFO] [stdout] 297 | objects: self.objects.iter().map(|(handle, (coord, object))| (handle.clone(), (coord.clone(), object.dummy()))).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*coord` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> src/quantities/mod.rs:78:40 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Quantity>(pub T); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `T` cannot be unsized because of the bound [INFO] [stdout] --> src/quantities/mod.rs:78:24 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Quantity>(pub T); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `QuantityTrait` has the bound `Clone` [INFO] [stdout] = note: ...because `Clone` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] = note: `#[warn(clippy::needless_maybe_sized)]` on by default [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 78 - pub struct Quantity>(pub T); [INFO] [stdout] 78 + pub struct Quantity>(pub T); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `?Sized` bound is ignored because of a `Sized` requirement [INFO] [stdout] --> src/quantities/mod.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | impl> TryFrom for Quantity [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: `T` cannot be unsized because of the bound [INFO] [stdout] --> src/quantities/mod.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | impl> TryFrom for Quantity [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = note: ...because `QuantityTrait` has the bound `Clone` [INFO] [stdout] = note: ...because `Clone` has the bound `Sized` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized [INFO] [stdout] help: change the bounds that require `Sized`, or remove the `?Sized` bound [INFO] [stdout] | [INFO] [stdout] 80 - impl> TryFrom for Quantity [INFO] [stdout] 80 + impl> TryFrom for Quantity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of right operand [INFO] [stdout] --> src/quantities/mod.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | (&uncancelled * &q2_ratio).cancel() [INFO] [stdout] | ^^^^^^^^^^^^^^^^---------^ [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `q2_ratio` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/quantities/mod.rs:203:25 [INFO] [stdout] | [INFO] [stdout] 203 | (&uncancelled * &q2_ratio).cancel() [INFO] [stdout] | ^^^^^^^^^ help: change this to: `q2_ratio` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/logging/format.rs:36:68 [INFO] [stdout] | [INFO] [stdout] 36 | formatted = formatted.replace(&format!("{{{}}}", key), &value); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/logging/mod.rs:100:19 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn to_dyn(self) -> DynLogger { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/lang/mod.rs:31:125 [INFO] [stdout] | [INFO] [stdout] 31 | ...rase.conjugate(person), verb.prepositional_phrase.to_string()), [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:37:11 [INFO] [stdout] | [INFO] [stdout] 37 | while !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:48:11 [INFO] [stdout] | [INFO] [stdout] 48 | while !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:55:11 [INFO] [stdout] | [INFO] [stdout] 55 | while !gender_res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `gender_res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/character_creation/mod.rs:59:15 [INFO] [stdout] | [INFO] [stdout] 59 | while !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/lobby/mod.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / pub enum HostError { [INFO] [stdout] 37 | | AddCharacterError(Box), [INFO] [stdout] 38 | | ListenerError(Box), [INFO] [stdout] 39 | | RegisterConnectionError(Box), [INFO] [stdout] 40 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lobby/mod.rs:63:31 [INFO] [stdout] | [INFO] [stdout] 63 | .map_err(|e| Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string())))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 63 - .map_err(|e| Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string())))?; [INFO] [stdout] 63 + .map_err(|e| Box::new(std::io::Error::other(e.to_string())))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lobby/mod.rs:75:47 [INFO] [stdout] | [INFO] [stdout] 75 | Err(e) => return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 75 - Err(e) => return Err(Box::new(std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))), [INFO] [stdout] 75 + Err(e) => return Err(Box::new(std::io::Error::other(e.to_string()))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/lobby/mod.rs:130:22 [INFO] [stdout] | [INFO] [stdout] 130 | fn add_character<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.92s [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lobby/mod.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | lobby.register_connection(stream, socket_addr).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 73 | let _ = lobby.register_connection(stream, socket_addr).await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `async_trait_bounds` is declared but not used [INFO] [stdout] --> src/main.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | #![feature(async_trait_bounds)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "27a43e8bd089dac01ecd0519cc5be0cc0e9be6ad6b042bb07e1fb1dc7d808428", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "27a43e8bd089dac01ecd0519cc5be0cc0e9be6ad6b042bb07e1fb1dc7d808428", kill_on_drop: false }` [INFO] [stdout] 27a43e8bd089dac01ecd0519cc5be0cc0e9be6ad6b042bb07e1fb1dc7d808428