[INFO] fetching crate rust_pay_wf_core 0.4.4... [INFO] linting rust_pay_wf_core-0.4.4 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate rust_pay_wf_core 0.4.4 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate rust_pay_wf_core 0.4.4 [INFO] finished tweaking crates.io crate rust_pay_wf_core 0.4.4 [INFO] tweaked toml for crates.io crate rust_pay_wf_core 0.4.4 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rust_pay_wf_core 0.4.4 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 crates.io crate rust_pay_wf_core 0.4.4 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 urlencoding v1.3.3 [INFO] [stderr] Downloaded tempfile v3.22.0 [INFO] [stderr] Downloaded wasm-bindgen-futures v0.4.53 [INFO] [stderr] Downloaded cc v1.2.37 [INFO] [stderr] Downloaded web-sys v0.3.80 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 1b9d6fa1e809504bad53c154c7c9b7675bbcd75b99e42ee254cfa597b0e0a885 [INFO] running `Command { std: "docker" "start" "-a" "1b9d6fa1e809504bad53c154c7c9b7675bbcd75b99e42ee254cfa597b0e0a885", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1b9d6fa1e809504bad53c154c7c9b7675bbcd75b99e42ee254cfa597b0e0a885", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1b9d6fa1e809504bad53c154c7c9b7675bbcd75b99e42ee254cfa597b0e0a885", kill_on_drop: false }` [INFO] [stdout] 1b9d6fa1e809504bad53c154c7c9b7675bbcd75b99e42ee254cfa597b0e0a885 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] a225c1498bbe44ae0ba768753d47c4647c77e50a352f348481fdfaa4c6e486b0 [INFO] running `Command { std: "docker" "start" "-a" "a225c1498bbe44ae0ba768753d47c4647c77e50a352f348481fdfaa4c6e486b0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Compiling find-msvc-tools v0.1.1 [INFO] [stderr] Compiling serde_core v1.0.225 [INFO] [stderr] Compiling serde v1.0.225 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Compiling anyhow v1.0.99 [INFO] [stderr] Checking deranged v0.5.3 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking urlencoding v1.3.3 [INFO] [stderr] Compiling cc v1.2.37 [INFO] [stderr] Checking indexmap v2.11.3 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking socket2 v0.6.0 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking time v0.3.43 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking universal-hash v0.5.1 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Checking tokio v1.47.1 [INFO] [stderr] Checking polyval v0.6.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking ctr v0.9.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking ghash v0.5.1 [INFO] [stderr] Checking aes-gcm v0.10.3 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling serde_derive v1.0.225 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.3 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking rust_pay_wf_core v0.4.4 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/alipay/client.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | .map_err(|e| PayError::Http(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Http` [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: redundant closure [INFO] [stdout] --> src/alipay/client.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | .map_err(|e| PayError::Http(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Http` [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/alipay/client.rs:57:72 [INFO] [stdout] | [INFO] [stdout] 57 | let v: serde_json::Value = serde_json::from_str(&resp).map_err(|e| PayError::Json(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Json` [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: this boolean expression can be simplified [INFO] [stdout] --> src/alipay/client.rs:63:16 [INFO] [stdout] | [INFO] [stdout] 63 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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: redundant closure [INFO] [stdout] --> src/alipay/client.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | .map_err(|e| PayError::Http(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Http` [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: this boolean expression can be simplified [INFO] [stdout] --> src/alipay/client.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 98 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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: redundant closure [INFO] [stdout] --> src/alipay/client.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | .map_err(|e| PayError::Http(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Http` [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/alipay/client.rs:57:72 [INFO] [stdout] | [INFO] [stdout] 57 | let v: serde_json::Value = serde_json::from_str(&resp).map_err(|e| PayError::Json(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Json` [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: this boolean expression can be simplified [INFO] [stdout] --> src/alipay/client.rs:63:16 [INFO] [stdout] | [INFO] [stdout] 63 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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/alipay/client.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 133 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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/alipay/client.rs:98:16 [INFO] [stdout] | [INFO] [stdout] 98 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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/alipay/client.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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/alipay/client.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 133 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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/alipay/client.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if !order.get("sub_merchant_id").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_merchant_id").is_none()` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/wechat/certs.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | Ok::(r.text().await?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 45 - Ok::(r.text().await?) [INFO] [stdout] 45 + r.text().await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/wechat/certs.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | Ok::(r.text().await?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 45 - Ok::(r.text().await?) [INFO] [stdout] 45 + r.text().await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/wechat/client.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | return self.endpoint(path); [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] 55 - return self.endpoint(path); [INFO] [stdout] 55 + self.endpoint(path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:65:16 [INFO] [stdout] | [INFO] [stdout] 65 | if !params.get("appid").is_some() && !params.get("sp_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("appid").is_none()` [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/wechat/client.rs:65:50 [INFO] [stdout] | [INFO] [stdout] 65 | if !params.get("appid").is_some() && !params.get("sp_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sp_appid").is_none()` [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/wechat/client.rs:71:16 [INFO] [stdout] | [INFO] [stdout] 71 | if !params.get("sp_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sp_appid").is_none()` [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/wechat/client.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 79 | if !params.get("sp_mchid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sp_mchid").is_none()` [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/wechat/client.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | if !params.get("sub_mchid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sub_mchid").is_none()` [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 `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/wechat/client.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Value::Object(payer_obj) = payer { [INFO] [stdout] 92 | | // 服务商模式下使用sub_openid而不是openid [INFO] [stdout] 93 | | if params.get("sub_appid").is_some() { [INFO] [stdout] 94 | | if let Some(openid) = payer_obj.remove("openid") { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/wechat/client.rs:90:25 [INFO] [stdout] | [INFO] [stdout] 90 | if let Some(payer) = params.clone().get_mut("payer") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 91 | if let Value::Object(payer_obj) = payer { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:116:16 [INFO] [stdout] | [INFO] [stdout] 116 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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: unneeded `return` statement [INFO] [stdout] --> src/wechat/client.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | return self.endpoint(path); [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] 55 - return self.endpoint(path); [INFO] [stdout] 55 + self.endpoint(path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:65:16 [INFO] [stdout] | [INFO] [stdout] 65 | if !params.get("appid").is_some() && !params.get("sp_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("appid").is_none()` [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/wechat/client.rs:65:50 [INFO] [stdout] | [INFO] [stdout] 65 | if !params.get("appid").is_some() && !params.get("sp_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sp_appid").is_none()` [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/wechat/client.rs:71:16 [INFO] [stdout] | [INFO] [stdout] 71 | if !params.get("sp_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sp_appid").is_none()` [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/wechat/client.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 79 | if !params.get("sp_mchid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sp_mchid").is_none()` [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/wechat/client.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | if !params.get("sub_mchid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("sub_mchid").is_none()` [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 `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/wechat/client.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Value::Object(payer_obj) = payer { [INFO] [stdout] 92 | | // 服务商模式下使用sub_openid而不是openid [INFO] [stdout] 93 | | if params.get("sub_appid").is_some() { [INFO] [stdout] 94 | | if let Some(openid) = payer_obj.remove("openid") { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/wechat/client.rs:90:25 [INFO] [stdout] | [INFO] [stdout] 90 | if let Some(payer) = params.clone().get_mut("payer") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 91 | if let Value::Object(payer_obj) = payer { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:116:16 [INFO] [stdout] | [INFO] [stdout] 116 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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/wechat/client.rs:190:16 [INFO] [stdout] | [INFO] [stdout] 190 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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/wechat/client.rs:243:16 [INFO] [stdout] | [INFO] [stdout] 243 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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/wechat/client.rs:261:16 [INFO] [stdout] | [INFO] [stdout] 261 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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/wechat/client.rs:190:16 [INFO] [stdout] | [INFO] [stdout] 190 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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/wechat/client.rs:243:16 [INFO] [stdout] | [INFO] [stdout] 243 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wechat/client.rs:358:47 [INFO] [stdout] | [INFO] [stdout] 358 | let resp = self.sign_and_post("POST", &url, &order).await?; [INFO] [stdout] | ^^^^ help: change this to: `url` [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: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:261:16 [INFO] [stdout] | [INFO] [stdout] 261 | if !order.get("sub_appid").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("sub_appid").is_none()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wechat/client.rs:395:47 [INFO] [stdout] | [INFO] [stdout] 395 | let resp = self.sign_and_post("POST", &url, &order).await?; [INFO] [stdout] | ^^^^ help: change this to: `url` [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/wechat/client.rs:358:47 [INFO] [stdout] | [INFO] [stdout] 358 | let resp = self.sign_and_post("POST", &url, &order).await?; [INFO] [stdout] | ^^^^ help: change this to: `url` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wechat/client.rs:395:47 [INFO] [stdout] | [INFO] [stdout] 395 | let resp = self.sign_and_post("POST", &url, &order).await?; [INFO] [stdout] | ^^^^ help: change this to: `url` [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: redundant closure [INFO] [stdout] --> src/wechat/notify.rs:51:71 [INFO] [stdout] | [INFO] [stdout] 51 | let v: serde_json::Value = serde_json::from_str(body).map_err(|e| PayError::Json(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Json` [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/wechat/notify.rs:65:54 [INFO] [stdout] | [INFO] [stdout] 65 | serde_json::from_str(&plain).map_err(|e| PayError::Json(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Json` [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/wechat/notify.rs:51:71 [INFO] [stdout] | [INFO] [stdout] 51 | let v: serde_json::Value = serde_json::from_str(body).map_err(|e| PayError::Json(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Json` [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/wechat/notify.rs:65:54 [INFO] [stdout] | [INFO] [stdout] 65 | serde_json::from_str(&plain).map_err(|e| PayError::Json(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PayError::Json` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.71s [INFO] running `Command { std: "docker" "inspect" "a225c1498bbe44ae0ba768753d47c4647c77e50a352f348481fdfaa4c6e486b0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a225c1498bbe44ae0ba768753d47c4647c77e50a352f348481fdfaa4c6e486b0", kill_on_drop: false }` [INFO] [stdout] a225c1498bbe44ae0ba768753d47c4647c77e50a352f348481fdfaa4c6e486b0