[INFO] cloning repository https://github.com/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhashworks%2Frelaxdays-hackathon-2022-vol-3-marketplacesimulation", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhashworks%2Frelaxdays-hackathon-2022-vol-3-marketplacesimulation'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b05dbb6f104ca8945500a97cfa5b8fad063d5e3c [INFO] linting hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhashworks%2Frelaxdays-hackathon-2022-vol-3-marketplacesimulation" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation [INFO] finished tweaking git repo https://github.com/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation [INFO] tweaked toml for git repo https://github.com/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation 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/hashworks/relaxdays-hackathon-2022-vol-3-marketplacesimulation 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] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tracing-core v0.1.28 [INFO] [stderr] Downloaded smallvec v1.8.1 [INFO] [stderr] Downloaded tracing v0.1.35 [INFO] [stderr] Downloaded hashbrown v0.12.1 [INFO] [stderr] Downloaded hyper v0.14.19 [INFO] [stderr] Downloaded openssl-sys v0.9.74 [INFO] [stderr] Downloaded unicode-normalization v0.1.20 [INFO] [stderr] Downloaded openssl v0.10.40 [INFO] [stderr] Downloaded tokio v1.19.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 3626426d3de65aec24f0856fbd0f898fbbe2662d10004e8c5dd8a95d9f23c314 [INFO] running `Command { std: "docker" "start" "-a" "3626426d3de65aec24f0856fbd0f898fbbe2662d10004e8c5dd8a95d9f23c314", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3626426d3de65aec24f0856fbd0f898fbbe2662d10004e8c5dd8a95d9f23c314", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3626426d3de65aec24f0856fbd0f898fbbe2662d10004e8c5dd8a95d9f23c314", kill_on_drop: false }` [INFO] [stdout] 3626426d3de65aec24f0856fbd0f898fbbe2662d10004e8c5dd8a95d9f23c314 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 888658c9744fc6b8bd9e597f0d57d2b410ce2c8601d78edbf09c3d9fffa4f243 [INFO] running `Command { std: "docker" "start" "-a" "888658c9744fc6b8bd9e597f0d57d2b410ce2c8601d78edbf09c3d9fffa4f243", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling proc-macro2 v1.0.40 [INFO] [stderr] Compiling quote v1.0.20 [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling syn v1.0.98 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Checking once_cell v1.12.0 [INFO] [stderr] Compiling openssl-sys v0.9.74 [INFO] [stderr] Checking smallvec v1.8.1 [INFO] [stderr] Compiling futures-core v0.3.21 [INFO] [stderr] Checking itoa v1.0.2 [INFO] [stderr] Compiling futures-task v0.3.21 [INFO] [stderr] Checking tracing-core v0.1.28 [INFO] [stderr] Compiling indexmap v1.9.1 [INFO] [stderr] Compiling futures-util v0.3.21 [INFO] [stderr] Compiling openssl v0.10.40 [INFO] [stderr] Checking http v0.2.8 [INFO] [stderr] Compiling futures-channel v0.3.21 [INFO] [stderr] Compiling native-tls v0.2.10 [INFO] [stderr] Checking parking_lot_core v0.9.3 [INFO] [stderr] Checking num_cpus v1.13.1 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking mio v0.8.4 [INFO] [stderr] Checking socket2 v0.4.4 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking tracing v0.1.35 [INFO] [stderr] Compiling serde v1.0.137 [INFO] [stderr] Checking hashbrown v0.12.1 [INFO] [stderr] Checking want v0.3.0 [INFO] [stderr] Checking unicode-normalization v0.1.20 [INFO] [stderr] Checking getrandom v0.2.7 [INFO] [stderr] Checking http-body v0.4.5 [INFO] [stderr] Checking ryu v1.0.10 [INFO] [stderr] Compiling serde_json v1.0.81 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking idna v0.2.3 [INFO] [stderr] Checking url v2.2.2 [INFO] [stderr] Compiling tokio-macros v1.8.0 [INFO] [stderr] Compiling openssl-macros v0.1.0 [INFO] [stderr] Compiling serde_derive v1.0.137 [INFO] [stderr] Checking tokio v1.19.2 [INFO] [stderr] Checking tokio-util v0.7.3 [INFO] [stderr] Checking tokio-native-tls v0.3.0 [INFO] [stderr] Checking h2 v0.3.13 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking hyper v0.14.19 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.11 [INFO] [stderr] Checking marketplacesimulation v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/client/types.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.id == other.id [INFO] [stdout] 87 | | && self.player == other.player [INFO] [stdout] 88 | | && self.player == other.player [INFO] [stdout] 89 | | && self.article == other.count [INFO] [stdout] 90 | | && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] | |__________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 90 - && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] 86 + !(self.id != other.id || self.player != other.player || self.article != other.count || (self.price * 1e6) as usize != (other.price * 1e6) as usize) [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 90 - && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] 86 + self.id == other.id && self.player == other.player && self.article == other.count && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/client/types.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.id == other.id [INFO] [stdout] 87 | | && self.player == other.player [INFO] [stdout] 88 | | && self.player == other.player [INFO] [stdout] 89 | | && self.article == other.count [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 86 + !(self.id != other.id || self.player != other.player || self.article != other.count) [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 86 + self.id == other.id && self.player == other.player && self.article == other.count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/client/types.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.id == other.id [INFO] [stdout] 87 | | && self.player == other.player [INFO] [stdout] 88 | | && self.player == other.player [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 86 + !(self.id != other.id || self.player != other.player) [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 86 + self.id == other.id && self.player == other.player [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/client/mod.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | money: std::f64::MAX, // Unrealistic number, so we can initialize cleanly [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 94 - money: std::f64::MAX, // Unrealistic number, so we can initialize cleanly [INFO] [stdout] 94 + money: f64::MAX, // Unrealistic number, so we can initialize cleanly [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:104:33 [INFO] [stdout] | [INFO] [stdout] 104 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 105 | | std::io::ErrorKind::Other, [INFO] [stdout] 106 | | "Failed to fetch player self", [INFO] [stdout] 107 | | ))); [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] 104 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 105 ~ "Failed to fetch player self", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:110:33 [INFO] [stdout] | [INFO] [stdout] 110 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 111 | | std::io::ErrorKind::Other, [INFO] [stdout] 112 | | "Failed to fetch articles", [INFO] [stdout] 113 | | ))); [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] 110 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 111 ~ "Failed to fetch articles", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:116:33 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 117 | | std::io::ErrorKind::Other, [INFO] [stdout] 118 | | "Failed to fetch tags", [INFO] [stdout] 119 | | ))); [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] 116 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 117 ~ "Failed to fetch tags", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:122:33 [INFO] [stdout] | [INFO] [stdout] 122 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 123 | | std::io::ErrorKind::Other, [INFO] [stdout] 124 | | "Failed to fetch suppliers", [INFO] [stdout] 125 | | ))); [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] 122 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 123 ~ "Failed to fetch suppliers", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:128:33 [INFO] [stdout] | [INFO] [stdout] 128 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 129 | | std::io::ErrorKind::Other, [INFO] [stdout] 130 | | "Failed to fetch listings", [INFO] [stdout] 131 | | ))); [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] 128 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 129 ~ "Failed to fetch listings", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/client/mod.rs:143:36 [INFO] [stdout] | [INFO] [stdout] 143 | .request(request_type, &format!("{}{}", self.api_url, endpoint)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}{}", self.api_url, endpoint)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/client/mod.rs:213:17 [INFO] [stdout] | [INFO] [stdout] 213 | / if !self.tag_trend_levels.contains_key(&tag.id) { [INFO] [stdout] 214 | | self.tag_trend_levels.insert(tag.id, 0); [INFO] [stdout] 215 | | } [INFO] [stdout] | |_________________^ help: try: `self.tag_trend_levels.entry(tag.id).or_insert(0);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` 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/client/mod.rs:380:40 [INFO] [stdout] | [INFO] [stdout] 380 | .authorized_requestbuilder(&endpoint, reqwest::Method::POST) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `endpoint` [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: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/game/mod.rs:300:42 [INFO] [stdout] | [INFO] [stdout] 300 | let supplier_stock = supplier [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 301 | | .stock [INFO] [stdout] 302 | | .iter() [INFO] [stdout] 303 | | .filter(|supplier_stock| { [INFO] [stdout] 304 | | &supplier_stock.article_id == article_id && supplier_stock.stock > 0 [INFO] [stdout] 305 | | }) [INFO] [stdout] 306 | | .next(); [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/game/mod.rs:307:21 [INFO] [stdout] | [INFO] [stdout] 307 | / match supplier_stock { [INFO] [stdout] 308 | | Some(supplier_stock) => Some((supplier.id, supplier_stock.clone())), [INFO] [stdout] 309 | | None => None, [INFO] [stdout] 310 | | } [INFO] [stdout] | |_____________________^ help: try: `supplier_stock.map(|supplier_stock| (supplier.id, supplier_stock.clone()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game/mod.rs:401:27 [INFO] [stdout] | [INFO] [stdout] 401 | let listing = own_listings [INFO] [stdout] | ___________________________^ [INFO] [stdout] 402 | | .iter() [INFO] [stdout] 403 | | .map(|listing| listing.clone()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 401 ~ let listing = own_listings [INFO] [stdout] 402 + .iter().cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/client/types.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.id == other.id [INFO] [stdout] 87 | | && self.player == other.player [INFO] [stdout] 88 | | && self.player == other.player [INFO] [stdout] 89 | | && self.article == other.count [INFO] [stdout] 90 | | && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] | |__________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 90 - && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] 86 + !(self.id != other.id || self.player != other.player || self.article != other.count || (self.price * 1e6) as usize != (other.price * 1e6) as usize) [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 90 - && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] 86 + self.id == other.id && self.player == other.player && self.article == other.count && (self.price * 1e6) as usize == (other.price * 1e6) as usize [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/client/types.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.id == other.id [INFO] [stdout] 87 | | && self.player == other.player [INFO] [stdout] 88 | | && self.player == other.player [INFO] [stdout] 89 | | && self.article == other.count [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 86 + !(self.id != other.id || self.player != other.player || self.article != other.count) [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 89 - && self.article == other.count [INFO] [stdout] 86 + self.id == other.id && self.player == other.player && self.article == other.count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/client/types.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.id == other.id [INFO] [stdout] 87 | | && self.player == other.player [INFO] [stdout] 88 | | && self.player == other.player [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 86 + !(self.id != other.id || self.player != other.player) [INFO] [stdout] | [INFO] [stdout] 86 - self.id == other.id [INFO] [stdout] 87 - && self.player == other.player [INFO] [stdout] 88 - && self.player == other.player [INFO] [stdout] 86 + self.id == other.id && self.player == other.player [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/client/mod.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | money: std::f64::MAX, // Unrealistic number, so we can initialize cleanly [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 94 - money: std::f64::MAX, // Unrealistic number, so we can initialize cleanly [INFO] [stdout] 94 + money: f64::MAX, // Unrealistic number, so we can initialize cleanly [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:104:33 [INFO] [stdout] | [INFO] [stdout] 104 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 105 | | std::io::ErrorKind::Other, [INFO] [stdout] 106 | | "Failed to fetch player self", [INFO] [stdout] 107 | | ))); [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] 104 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 105 ~ "Failed to fetch player self", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:110:33 [INFO] [stdout] | [INFO] [stdout] 110 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 111 | | std::io::ErrorKind::Other, [INFO] [stdout] 112 | | "Failed to fetch articles", [INFO] [stdout] 113 | | ))); [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] 110 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 111 ~ "Failed to fetch articles", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:116:33 [INFO] [stdout] | [INFO] [stdout] 116 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 117 | | std::io::ErrorKind::Other, [INFO] [stdout] 118 | | "Failed to fetch tags", [INFO] [stdout] 119 | | ))); [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] 116 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 117 ~ "Failed to fetch tags", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:122:33 [INFO] [stdout] | [INFO] [stdout] 122 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 123 | | std::io::ErrorKind::Other, [INFO] [stdout] 124 | | "Failed to fetch suppliers", [INFO] [stdout] 125 | | ))); [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] 122 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 123 ~ "Failed to fetch suppliers", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/client/mod.rs:128:33 [INFO] [stdout] | [INFO] [stdout] 128 | return Err(Box::new(std::io::Error::new( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 129 | | std::io::ErrorKind::Other, [INFO] [stdout] 130 | | "Failed to fetch listings", [INFO] [stdout] 131 | | ))); [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] 128 ~ return Err(Box::new(std::io::Error::other( [INFO] [stdout] 129 ~ "Failed to fetch listings", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/client/mod.rs:143:36 [INFO] [stdout] | [INFO] [stdout] 143 | .request(request_type, &format!("{}{}", self.api_url, endpoint)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}{}", self.api_url, endpoint)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/client/mod.rs:213:17 [INFO] [stdout] | [INFO] [stdout] 213 | / if !self.tag_trend_levels.contains_key(&tag.id) { [INFO] [stdout] 214 | | self.tag_trend_levels.insert(tag.id, 0); [INFO] [stdout] 215 | | } [INFO] [stdout] | |_________________^ help: try: `self.tag_trend_levels.entry(tag.id).or_insert(0);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` 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/client/mod.rs:380:40 [INFO] [stdout] | [INFO] [stdout] 380 | .authorized_requestbuilder(&endpoint, reqwest::Method::POST) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `endpoint` [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: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/game/mod.rs:300:42 [INFO] [stdout] | [INFO] [stdout] 300 | let supplier_stock = supplier [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 301 | | .stock [INFO] [stdout] 302 | | .iter() [INFO] [stdout] 303 | | .filter(|supplier_stock| { [INFO] [stdout] 304 | | &supplier_stock.article_id == article_id && supplier_stock.stock > 0 [INFO] [stdout] 305 | | }) [INFO] [stdout] 306 | | .next(); [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/game/mod.rs:307:21 [INFO] [stdout] | [INFO] [stdout] 307 | / match supplier_stock { [INFO] [stdout] 308 | | Some(supplier_stock) => Some((supplier.id, supplier_stock.clone())), [INFO] [stdout] 309 | | None => None, [INFO] [stdout] 310 | | } [INFO] [stdout] | |_____________________^ help: try: `supplier_stock.map(|supplier_stock| (supplier.id, supplier_stock.clone()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/game/mod.rs:401:27 [INFO] [stdout] | [INFO] [stdout] 401 | let listing = own_listings [INFO] [stdout] | ___________________________^ [INFO] [stdout] 402 | | .iter() [INFO] [stdout] 403 | | .map(|listing| listing.clone()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 401 ~ let listing = own_listings [INFO] [stdout] 402 + .iter().cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 35.40s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: openssl v0.10.40 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "888658c9744fc6b8bd9e597f0d57d2b410ce2c8601d78edbf09c3d9fffa4f243", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "888658c9744fc6b8bd9e597f0d57d2b410ce2c8601d78edbf09c3d9fffa4f243", kill_on_drop: false }` [INFO] [stdout] 888658c9744fc6b8bd9e597f0d57d2b410ce2c8601d78edbf09c3d9fffa4f243