[INFO] fetching crate rust_pay_wf 0.11.6... [INFO] linting rust_pay_wf-0.11.6 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate rust_pay_wf 0.11.6 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate rust_pay_wf 0.11.6 [INFO] finished tweaking crates.io crate rust_pay_wf 0.11.6 [INFO] tweaked toml for crates.io crate rust_pay_wf 0.11.6 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rust_pay_wf 0.11.6 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 0.11.6 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] cef9f1991559610e02fc16b6dc4add5974c80365fc6cc8acdd97dea2e4eedbfb [INFO] running `Command { std: "docker" "start" "-a" "cef9f1991559610e02fc16b6dc4add5974c80365fc6cc8acdd97dea2e4eedbfb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "cef9f1991559610e02fc16b6dc4add5974c80365fc6cc8acdd97dea2e4eedbfb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cef9f1991559610e02fc16b6dc4add5974c80365fc6cc8acdd97dea2e4eedbfb", kill_on_drop: false }` [INFO] [stdout] cef9f1991559610e02fc16b6dc4add5974c80365fc6cc8acdd97dea2e4eedbfb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 1a95d027dc5df1bd671a8e2993895754dc8ab31173c280463ca18a7121c3236a [INFO] running `Command { std: "docker" "start" "-a" "1a95d027dc5df1bd671a8e2993895754dc8ab31173c280463ca18a7121c3236a", kill_on_drop: false }` [INFO] [stderr] Compiling cc v1.2.41 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Compiling generic-array v0.14.9 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling openssl v0.10.74 [INFO] [stderr] Checking futures-task v0.3.31 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking urlencoding v1.3.3 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Compiling openssl-sys v0.9.110 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking universal-hash v0.5.1 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking polyval v0.6.2 [INFO] [stderr] Checking ctr v0.9.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking ghash v0.5.1 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.3 [INFO] [stderr] Checking aes-gcm v0.10.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 idna_adapter v1.2.1 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking tokio-rustls v0.24.1 [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 v0.11.6 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/alipay/client.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | if !order.get("extend_params").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("extend_params").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:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | if !order.get("extend_params").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `order.get("extend_params").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: unnecessary use of `to_string` [INFO] [stdout] --> src/utils.rs:145:19 [INFO] [stdout] | [INFO] [stdout] 145 | + &item.data().as_utf8().unwrap().to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `item.data().as_utf8().unwrap().as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/utils.rs:145:19 [INFO] [stdout] | [INFO] [stdout] 145 | + &item.data().as_utf8().unwrap().to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `item.data().as_utf8().unwrap().as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/wechat/certs.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | 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] 49 - Ok::(r.text().await?) [INFO] [stdout] 49 + r.text().await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/wechat/certs.rs:72:110 [INFO] [stdout] | [INFO] [stdout] 72 | println!("[refresh] store cert serial={} pub_pem={}", serial.as_str().unwrap_or_default().to_string(), pub_pem); [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: unneeded `return` statement [INFO] [stdout] --> src/wechat/client.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | 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] 60 - return self.endpoint(path); [INFO] [stdout] 60 + self.endpoint(path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:70:16 [INFO] [stdout] | [INFO] [stdout] 70 | 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:70:50 [INFO] [stdout] | [INFO] [stdout] 70 | 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:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | 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:84:16 [INFO] [stdout] | [INFO] [stdout] 84 | 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:88:16 [INFO] [stdout] | [INFO] [stdout] 88 | 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 boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:113:12 [INFO] [stdout] | [INFO] [stdout] 113 | if !params.get("notify_url").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("notify_url").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:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | 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] 49 - Ok::(r.text().await?) [INFO] [stdout] 49 + r.text().await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/wechat/client.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / if let Value::Object(payer_obj) = payer { [INFO] [stdout] 97 | | // 服务商模式下使用sub_openid而不是openid [INFO] [stdout] 98 | | if old_params.get("sub_appid").is_some() { [INFO] [stdout] 99 | | if let Some(openid) = payer_obj.remove("openid") { [INFO] [stdout] ... | [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/wechat/client.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | if let Some(payer) = params.get_mut("payer") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 96 | 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:123:16 [INFO] [stdout] | [INFO] [stdout] 123 | 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: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/wechat/certs.rs:72:110 [INFO] [stdout] | [INFO] [stdout] 72 | println!("[refresh] store cert serial={} pub_pem={}", serial.as_str().unwrap_or_default().to_string(), pub_pem); [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: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:167:16 [INFO] [stdout] | [INFO] [stdout] 167 | 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:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | 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] 60 - return self.endpoint(path); [INFO] [stdout] 60 + self.endpoint(path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:70:16 [INFO] [stdout] | [INFO] [stdout] 70 | 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:70:50 [INFO] [stdout] | [INFO] [stdout] 70 | 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:76:16 [INFO] [stdout] | [INFO] [stdout] 76 | 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:84:16 [INFO] [stdout] | [INFO] [stdout] 84 | 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:88:16 [INFO] [stdout] | [INFO] [stdout] 88 | 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 boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:212:16 [INFO] [stdout] | [INFO] [stdout] 212 | 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:113:12 [INFO] [stdout] | [INFO] [stdout] 113 | if !params.get("notify_url").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `params.get("notify_url").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:229:16 [INFO] [stdout] | [INFO] [stdout] 229 | 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 `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/wechat/client.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / if let Value::Object(payer_obj) = payer { [INFO] [stdout] 97 | | // 服务商模式下使用sub_openid而不是openid [INFO] [stdout] 98 | | if old_params.get("sub_appid").is_some() { [INFO] [stdout] 99 | | if let Some(openid) = payer_obj.remove("openid") { [INFO] [stdout] ... | [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/wechat/client.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | if let Some(payer) = params.get_mut("payer") { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 96 | 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:123:16 [INFO] [stdout] | [INFO] [stdout] 123 | 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:167:16 [INFO] [stdout] | [INFO] [stdout] 167 | 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:329:33 [INFO] [stdout] | [INFO] [stdout] 329 | let url = self.endpoint(&url); [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:212:16 [INFO] [stdout] | [INFO] [stdout] 212 | 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:381:33 [INFO] [stdout] | [INFO] [stdout] 381 | let url = self.endpoint(&url); [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 boolean expression can be simplified [INFO] [stdout] --> src/wechat/client.rs:229:16 [INFO] [stdout] | [INFO] [stdout] 229 | 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:329:33 [INFO] [stdout] | [INFO] [stdout] 329 | let url = self.endpoint(&url); [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:381:33 [INFO] [stdout] | [INFO] [stdout] 381 | let url = self.endpoint(&url); [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: deref which would be done by auto-deref [INFO] [stdout] --> src/wechat/client.rs:544:49 [INFO] [stdout] | [INFO] [stdout] 544 | let mut full_url = self.get_service_url(&*old_url); [INFO] [stdout] | ^^^^^^^^^ help: try: `&old_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/wechat/client.rs:544:49 [INFO] [stdout] | [INFO] [stdout] 544 | let mut full_url = self.get_service_url(&*old_url); [INFO] [stdout] | ^^^^^^^^^ help: try: `&old_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/wechat/notify.rs:65:71 [INFO] [stdout] | [INFO] [stdout] 65 | 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] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/wechat/notify.rs:79:54 [INFO] [stdout] | [INFO] [stdout] 79 | 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:65:71 [INFO] [stdout] | [INFO] [stdout] 65 | 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] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/wechat/notify.rs:79:54 [INFO] [stdout] | [INFO] [stdout] 79 | 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 26.15s [INFO] running `Command { std: "docker" "inspect" "1a95d027dc5df1bd671a8e2993895754dc8ab31173c280463ca18a7121c3236a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1a95d027dc5df1bd671a8e2993895754dc8ab31173c280463ca18a7121c3236a", kill_on_drop: false }` [INFO] [stdout] 1a95d027dc5df1bd671a8e2993895754dc8ab31173c280463ca18a7121c3236a