[INFO] cloning repository https://github.com/matrix360143/httpxr [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/matrix360143/httpxr" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatrix360143%2Fhttpxr", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatrix360143%2Fhttpxr'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 90ef012f5189acd9419626c0f0f5da873db85654 [INFO] linting matrix360143/httpxr against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmatrix360143%2Fhttpxr" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/matrix360143/httpxr [INFO] finished tweaking git repo https://github.com/matrix360143/httpxr [INFO] tweaked toml for git repo https://github.com/matrix360143/httpxr written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/matrix360143/httpxr 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/matrix360143/httpxr 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded mimalloc v0.1.48 [INFO] [stderr] Downloaded pyo3-async-runtimes v0.28.0 [INFO] [stderr] Downloaded libmimalloc-sys v0.1.44 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] ce274ffcf4d9a343549c1455423a3c89991cf8b41904629b6401de7849a072a4 [INFO] running `Command { std: "docker" "start" "-a" "ce274ffcf4d9a343549c1455423a3c89991cf8b41904629b6401de7849a072a4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ce274ffcf4d9a343549c1455423a3c89991cf8b41904629b6401de7849a072a4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ce274ffcf4d9a343549c1455423a3c89991cf8b41904629b6401de7849a072a4", kill_on_drop: false }` [INFO] [stdout] ce274ffcf4d9a343549c1455423a3c89991cf8b41904629b6401de7849a072a4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] c36dd2b781ab8ada155d6e9851caa7f919ec91fc46d066117795d259cb2c70bc [INFO] running `Command { std: "docker" "start" "-a" "c36dd2b781ab8ada155d6e9851caa7f919ec91fc46d066117795d259cb2c70bc", kill_on_drop: false }` [INFO] [stderr] Compiling target-lexicon v0.13.4 [INFO] [stderr] Checking slab v0.4.12 [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling syn v2.0.115 [INFO] [stderr] Compiling rustls v0.23.36 [INFO] [stderr] Compiling time-core v0.1.8 [INFO] [stderr] Compiling num-conv v0.2.0 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking deranged v0.5.6 [INFO] [stderr] Checking brotli v8.0.2 [INFO] [stderr] Compiling cookie v0.18.1 [INFO] [stderr] Checking compression-core v0.4.31 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking psl-types v2.0.11 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Compiling getrandom v0.4.1 [INFO] [stderr] Checking rand_core v0.10.0 [INFO] [stderr] Checking cpufeatures v0.3.0 [INFO] [stderr] Compiling time-macros v0.2.27 [INFO] [stderr] Checking inventory v0.3.21 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking simdutf8 v0.1.5 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking chacha20 v0.10.0 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Compiling pyo3-build-config v0.28.2 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking rand v0.10.0 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Checking time v0.3.47 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling libmimalloc-sys v0.1.44 [INFO] [stderr] Compiling pyo3-macros-backend v0.28.2 [INFO] [stderr] Compiling pyo3-ffi v0.28.2 [INFO] [stderr] Compiling pyo3 v0.28.2 [INFO] [stderr] Compiling aws-lc-sys v0.37.1 [INFO] [stderr] Checking mimalloc v0.1.48 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking compression-codecs v0.4.36 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Compiling pyo3-macros v0.28.2 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking halfbrown v0.4.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking publicsuffix v2.3.0 [INFO] [stderr] Checking value-trait v0.12.1 [INFO] [stderr] Checking cookie_store v0.22.0 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking async-compression v0.4.39 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking simd-json v0.17.0 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking pyo3-async-runtimes v0.28.0 [INFO] [stderr] Compiling aws-lc-rs v1.15.4 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking rustls-platform-verifier v0.6.2 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.13.2 [INFO] [stderr] Checking httpxr v0.30.23 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/api.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / /// Top-level convenience functions that create a temporary Client. [INFO] [stdout] 10 | | [INFO] [stdout] | |_^ [INFO] [stdout] 11 | fn extract_from_kwargs<'py>( [INFO] [stdout] | ---------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/api.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / /// Top-level convenience functions that create a temporary Client. [INFO] [stdout] 10 | | [INFO] [stdout] | |_^ [INFO] [stdout] 11 | fn extract_from_kwargs<'py>( [INFO] [stdout] | ---------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::sync_client_ext::PageIterator` [INFO] [stdout] --> src/client/sync_client_send.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use super::sync_client_ext::PageIterator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PyList` [INFO] [stdout] --> src/client/sync_client_ext.rs:2:56 [INFO] [stdout] | [INFO] [stdout] 2 | use pyo3::types::{PyAnyMethods, PyDict, PyDictMethods, PyList}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::sync_client_ext::PageIterator` [INFO] [stdout] --> src/client/sync_client_send.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use super::sync_client_ext::PageIterator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PyList` [INFO] [stdout] --> src/client/sync_client_ext.rs:2:56 [INFO] [stdout] | [INFO] [stdout] 2 | use pyo3::types::{PyAnyMethods, PyDict, PyDictMethods, PyList}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/config.rs:241:13 [INFO] [stdout] | [INFO] [stdout] 241 | auth: auth, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `auth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/config.rs:241:13 [INFO] [stdout] | [INFO] [stdout] 241 | auth: auth, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `auth` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/urlparse.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// RFC3986 URL parsing implemented in Rust. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | fn frag_safe() -> String { [INFO] [stdout] | ------------ the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/urlparse.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// RFC3986 URL parsing implemented in Rust. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | fn frag_safe() -> String { [INFO] [stdout] | ------------ the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/client/sync_client_ext.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | let f = kwargs.as_ref() [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `req` [INFO] [stdout] --> src/client/sync_client_ext.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | let req = slf.borrow().build_request( [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_req` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `chunk_size` [INFO] [stdout] --> src/client/sync_client_ext.rs:298:9 [INFO] [stdout] | [INFO] [stdout] 298 | chunk_size: usize, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_chunk_size` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/client/sync_client_ext.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | let f = kwargs.as_ref() [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `req` [INFO] [stdout] --> src/client/sync_client_ext.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | let req = slf.borrow().build_request( [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_req` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `chunk_size` [INFO] [stdout] --> src/client/sync_client_ext.rs:298:9 [INFO] [stdout] | [INFO] [stdout] 298 | chunk_size: usize, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_chunk_size` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/stream_ctx.rs:89:23 [INFO] [stdout] | [INFO] [stdout] 89 | fn __enter__<'py>(mut slf: Bound<'py, Self>, py: Python<'py>) -> PyResult> { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/stream_ctx.rs:89:23 [INFO] [stdout] | [INFO] [stdout] 89 | fn __enter__<'py>(mut slf: Bound<'py, Self>, py: Python<'py>) -> PyResult> { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/api.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn request( [INFO] [stdout] 21 | | py: Python<'_>, [INFO] [stdout] 22 | | method: &str, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 35 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 36 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/api.rs:336:1 [INFO] [stdout] | [INFO] [stdout] 336 | / pub fn stream( [INFO] [stdout] 337 | | py: Python<'_>, [INFO] [stdout] 338 | | method: &str, [INFO] [stdout] 339 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 351 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 352 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api.rs:446:22 [INFO] [stdout] | [INFO] [stdout] 446 | let results: Arc)>>> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/auth.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / if let Some(req) = self.request.take() { [INFO] [stdout] 45 | | Some(req.into_pyobject(py).unwrap().into()) [INFO] [stdout] 46 | | } else { [INFO] [stdout] 47 | | None [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ help: try: `self.request.take().map(|req| req.into_pyobject(py).unwrap().into())` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/auth.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / if let Some(req) = self.request.take() { [INFO] [stdout] 108 | | Some(req.into_pyobject(py).unwrap().into()) [INFO] [stdout] 109 | | } else { [INFO] [stdout] 110 | | None [INFO] [stdout] 111 | | } [INFO] [stdout] | |_________^ help: try: `self.request.take().map(|req| req.into_pyobject(py).unwrap().into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/auth.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 182 | / fn build_auth_header( [INFO] [stdout] 183 | | &self, [INFO] [stdout] 184 | | method: &str, [INFO] [stdout] 185 | | uri: &str, [INFO] [stdout] ... | [INFO] [stdout] 192 | | cnonce: &str, [INFO] [stdout] 193 | | ) -> PyResult { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/auth.rs:371:28 [INFO] [stdout] | [INFO] [stdout] 371 | if qop_options.iter().any(|q| *q == "auth") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `qop_options.contains(&"auth")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/auth.rs:373:35 [INFO] [stdout] | [INFO] [stdout] 373 | } else if qop_options.iter().any(|q| *q == "auth-int") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `qop_options.contains(&"auth-int")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/auth.rs:460:21 [INFO] [stdout] | [INFO] [stdout] 460 | / for cookie in iterator { [INFO] [stdout] 461 | | if let Ok(cookie) = cookie { [INFO] [stdout] 462 | | if let (Ok(name), Ok(value)) = [INFO] [stdout] 463 | | (cookie.getattr("name"), cookie.getattr("value")) [INFO] [stdout] ... | [INFO] [stdout] 472 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/auth.rs:461:25 [INFO] [stdout] | [INFO] [stdout] 461 | / if let Ok(cookie) = cookie { [INFO] [stdout] 462 | | if let (Ok(name), Ok(value)) = [INFO] [stdout] 463 | | (cookie.getattr("name"), cookie.getattr("value")) [INFO] [stdout] ... | [INFO] [stdout] 471 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 460 ~ for cookie in iterator.flatten() { [INFO] [stdout] 461 + if let (Ok(name), Ok(value)) = [INFO] [stdout] 462 + (cookie.getattr("name"), cookie.getattr("value")) [INFO] [stdout] 463 + { [INFO] [stdout] 464 + if let (Ok(n), Ok(v)) = [INFO] [stdout] 465 + (name.extract::(), value.extract::()) [INFO] [stdout] 466 + { [INFO] [stdout] 467 + cookie_list.push(format!("{}={}", n, v)); [INFO] [stdout] 468 + } [INFO] [stdout] 469 + } [INFO] [stdout] 470 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (21/7) [INFO] [stdout] --> src/client/async_client.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / fn new( [INFO] [stdout] 67 | | py: Python<'_>, [INFO] [stdout] 68 | | auth: Option, [INFO] [stdout] 69 | | params: Option>, [INFO] [stdout] ... | [INFO] [stdout] 87 | | rate_limit: Option, [INFO] [stdout] 88 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/client/async_client.rs:152:25 [INFO] [stdout] | [INFO] [stdout] 152 | / if let Err(e) = validate_auth_type(py, p.bind(py)) { [INFO] [stdout] 153 | | return Err(e); [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________________________^ help: replace it with: `validate_auth_type(py, p.bind(py))?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/client/async_client.rs:296:46 [INFO] [stdout] | [INFO] [stdout] 296 | let mut history_entries: Vec<(u16, Vec<(Vec, Vec)>, Vec, String)> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/client/async_client.rs:480:29 [INFO] [stdout] | [INFO] [stdout] 480 | ... Ok(Py::new(py, response)?) [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] 480 - Ok(Py::new(py, response)?) [INFO] [stdout] 480 + Py::new(py, response) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/client/async_client.rs:695:21 [INFO] [stdout] | [INFO] [stdout] 695 | return Ok((Some((new_req, history)), None)); [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] 695 - return Ok((Some((new_req, history)), None)); [INFO] [stdout] 695 + Ok((Some((new_req, history)), None)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/client/async_client_send.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub(crate) async fn _send_with_auth_flow( [INFO] [stdout] 13 | | start: Instant, [INFO] [stdout] 14 | | flow: Py, [INFO] [stdout] 15 | | original_req: Request, [INFO] [stdout] ... | [INFO] [stdout] 21 | | default_encoding: Option>, [INFO] [stdout] 22 | | ) -> PyResult> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/async_client_send.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | / if resp_body_needed { [INFO] [stdout] 120 | | if response.content_bytes.is_none() { [INFO] [stdout] 121 | | Python::attach(|py| { [INFO] [stdout] 122 | | let resp_py = Py::new(py, response.clone())?; [INFO] [stdout] ... | [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 119 ~ if resp_body_needed [INFO] [stdout] 120 ~ && response.content_bytes.is_none() { [INFO] [stdout] 121 | Python::attach(|py| { [INFO] [stdout] ... [INFO] [stdout] 126 | })?; [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/client/async_client_send.rs:234:58 [INFO] [stdout] | [INFO] [stdout] 234 | .call_method1("build_request", (method, url)) [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 235 | | .map_err(|e| e)? [INFO] [stdout] | |___________________________^ help: remove the call to `map_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (16/7) [INFO] [stdout] --> src/client/async_client_send.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | / pub fn request<'py>( [INFO] [stdout] 250 | | &self, [INFO] [stdout] 251 | | py: Python<'py>, [INFO] [stdout] 252 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 265 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 266 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/async_client_send.rs:509:58 [INFO] [stdout] | [INFO] [stdout] 509 | if !["http", "https", "ws", "wss"].contains(&&*scheme) && !has_mount { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/async_client_send.rs:516:59 [INFO] [stdout] | [INFO] [stdout] 516 | if host.is_empty() && ["http", "https"].contains(&&*scheme) { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/api.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn request( [INFO] [stdout] 21 | | py: Python<'_>, [INFO] [stdout] 22 | | method: &str, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 35 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 36 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_send.rs:675:5 [INFO] [stdout] | [INFO] [stdout] 675 | / fn get<'py>( [INFO] [stdout] 676 | | &self, [INFO] [stdout] 677 | | py: Python<'py>, [INFO] [stdout] 678 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 685 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 686 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/client/async_client_send.rs:690:37 [INFO] [stdout] | [INFO] [stdout] 690 | && (kwargs.is_none() || kwargs.map_or(true, |k| k.is_empty())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 690 - && (kwargs.is_none() || kwargs.map_or(true, |k| k.is_empty())); [INFO] [stdout] 690 + && (kwargs.is_none() || kwargs.is_none_or(|k| k.is_empty())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/client/async_client_send.rs:785:42 [INFO] [stdout] | [INFO] [stdout] 785 | let mut history: Vec<(u16, Vec<(Vec, Vec)>, Vec, String)> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/client/async_client_send.rs:945:29 [INFO] [stdout] | [INFO] [stdout] 945 | ... Ok(Py::new(py, response)?) [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] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 945 - Ok(Py::new(py, response)?) [INFO] [stdout] 945 + Py::new(py, response) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_methods.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / fn $name<'py>( [INFO] [stdout] 20 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 21 | | params: Option<&Bound<'_, PyAny>>, headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 22 | | cookies: Option<&Bound<'_, PyAny>>, follow_redirects: Option, [INFO] [stdout] 23 | | timeout: Option<&Bound<'_, PyAny>>, extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 24 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 25 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 62 | async_no_body_method!(head, "HEAD"); [INFO] [stdout] | ----------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_methods.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / fn $name<'py>( [INFO] [stdout] 20 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 21 | | params: Option<&Bound<'_, PyAny>>, headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 22 | | cookies: Option<&Bound<'_, PyAny>>, follow_redirects: Option, [INFO] [stdout] 23 | | timeout: Option<&Bound<'_, PyAny>>, extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 24 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 25 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 63 | async_no_body_method!(options, "OPTIONS"); [INFO] [stdout] | ----------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_methods.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / fn $name<'py>( [INFO] [stdout] 20 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 21 | | params: Option<&Bound<'_, PyAny>>, headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 22 | | cookies: Option<&Bound<'_, PyAny>>, follow_redirects: Option, [INFO] [stdout] 23 | | timeout: Option<&Bound<'_, PyAny>>, extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 24 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 25 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 64 | async_no_body_method!(delete, "DELETE"); [INFO] [stdout] | --------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/api.rs:336:1 [INFO] [stdout] | [INFO] [stdout] 336 | / pub fn stream( [INFO] [stdout] 337 | | py: Python<'_>, [INFO] [stdout] 338 | | method: &str, [INFO] [stdout] 339 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 351 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 352 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/async_client_methods.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / fn $name<'py>( [INFO] [stdout] 43 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 44 | | content: Option<&Bound<'_, PyAny>>, data: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 45 | | files: Option<&Bound<'_, PyAny>>, json: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 49 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 50 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 65 | async_body_method!(post, "POST"); [INFO] [stdout] | -------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/async_client_methods.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / fn $name<'py>( [INFO] [stdout] 43 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 44 | | content: Option<&Bound<'_, PyAny>>, data: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 45 | | files: Option<&Bound<'_, PyAny>>, json: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 49 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 50 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 66 | async_body_method!(put, "PUT"); [INFO] [stdout] | ------------------------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api.rs:446:22 [INFO] [stdout] | [INFO] [stdout] 446 | let results: Arc)>>> = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/async_client_methods.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / fn $name<'py>( [INFO] [stdout] 43 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 44 | | content: Option<&Bound<'_, PyAny>>, data: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 45 | | files: Option<&Bound<'_, PyAny>>, json: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 49 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 50 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 67 | async_body_method!(patch, "PATCH"); [INFO] [stdout] | ---------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/client/async_client_methods.rs:152:14 [INFO] [stdout] | [INFO] [stdout] 152 | .map(|t| Py::new(py, t.clone()).ok()) [INFO] [stdout] | ______________^ [INFO] [stdout] 153 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|t| Py::new(py, t.clone()).ok())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/client/async_client_methods.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / pub fn build_request( [INFO] [stdout] 190 | | &self, [INFO] [stdout] 191 | | py: Python<'_>, [INFO] [stdout] 192 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 201 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 202 | | ) -> PyResult { [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/client/async_client_methods.rs:304:40 [INFO] [stdout] | [INFO] [stdout] 304 | Ok(t) => t.bind(py).is(&transport.bind(py)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `transport.bind(py)` [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: you are needlessly cloning iterator elements [INFO] [stdout] --> src/client/async_client_methods.rs:315:14 [INFO] [stdout] | [INFO] [stdout] 315 | ).map(|b| b.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/auth.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / if let Some(req) = self.request.take() { [INFO] [stdout] 45 | | Some(req.into_pyobject(py).unwrap().into()) [INFO] [stdout] 46 | | } else { [INFO] [stdout] 47 | | None [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ help: try: `self.request.take().map(|req| req.into_pyobject(py).unwrap().into())` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/client/async_client_methods.rs:410:27 [INFO] [stdout] | [INFO] [stdout] 410 | ... let mut prepared: Vec<(String, String, Vec<(Vec, Vec)>, Option>, Option)> = Vec::with_ca... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/auth.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | / if let Some(req) = self.request.take() { [INFO] [stdout] 108 | | Some(req.into_pyobject(py).unwrap().into()) [INFO] [stdout] 109 | | } else { [INFO] [stdout] 110 | | None [INFO] [stdout] 111 | | } [INFO] [stdout] | |_________^ help: try: `self.request.take().map(|req| req.into_pyobject(py).unwrap().into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/client/async_client_methods.rs:638:21 [INFO] [stdout] | [INFO] [stdout] 638 | pattern.split("://").nth(1).map_or(false, |r| !r.is_empty()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 638 - pattern.split("://").nth(1).map_or(false, |r| !r.is_empty()), [INFO] [stdout] 638 + pattern.split("://").nth(1).is_some_and(|r| !r.is_empty()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/auth.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 182 | / fn build_auth_header( [INFO] [stdout] 183 | | &self, [INFO] [stdout] 184 | | method: &str, [INFO] [stdout] 185 | | uri: &str, [INFO] [stdout] ... | [INFO] [stdout] 192 | | cnonce: &str, [INFO] [stdout] 193 | | ) -> PyResult { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/auth.rs:371:28 [INFO] [stdout] | [INFO] [stdout] 371 | if qop_options.iter().any(|q| *q == "auth") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `qop_options.contains(&"auth")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/auth.rs:373:35 [INFO] [stdout] | [INFO] [stdout] 373 | } else if qop_options.iter().any(|q| *q == "auth-int") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `qop_options.contains(&"auth-int")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/auth.rs:460:21 [INFO] [stdout] | [INFO] [stdout] 460 | / for cookie in iterator { [INFO] [stdout] 461 | | if let Ok(cookie) = cookie { [INFO] [stdout] 462 | | if let (Ok(name), Ok(value)) = [INFO] [stdout] 463 | | (cookie.getattr("name"), cookie.getattr("value")) [INFO] [stdout] ... | [INFO] [stdout] 472 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/auth.rs:461:25 [INFO] [stdout] | [INFO] [stdout] 461 | / if let Ok(cookie) = cookie { [INFO] [stdout] 462 | | if let (Ok(name), Ok(value)) = [INFO] [stdout] 463 | | (cookie.getattr("name"), cookie.getattr("value")) [INFO] [stdout] ... | [INFO] [stdout] 471 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 460 ~ for cookie in iterator.flatten() { [INFO] [stdout] 461 + if let (Ok(name), Ok(value)) = [INFO] [stdout] 462 + (cookie.getattr("name"), cookie.getattr("value")) [INFO] [stdout] 463 + { [INFO] [stdout] 464 + if let (Ok(n), Ok(v)) = [INFO] [stdout] 465 + (name.extract::(), value.extract::()) [INFO] [stdout] 466 + { [INFO] [stdout] 467 + cookie_list.push(format!("{}={}", n, v)); [INFO] [stdout] 468 + } [INFO] [stdout] 469 + } [INFO] [stdout] 470 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (21/7) [INFO] [stdout] --> src/client/async_client.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 66 | / fn new( [INFO] [stdout] 67 | | py: Python<'_>, [INFO] [stdout] 68 | | auth: Option, [INFO] [stdout] 69 | | params: Option>, [INFO] [stdout] ... | [INFO] [stdout] 87 | | rate_limit: Option, [INFO] [stdout] 88 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/client/async_client.rs:152:25 [INFO] [stdout] | [INFO] [stdout] 152 | / if let Err(e) = validate_auth_type(py, p.bind(py)) { [INFO] [stdout] 153 | | return Err(e); [INFO] [stdout] 154 | | } [INFO] [stdout] | |_________________________^ help: replace it with: `validate_auth_type(py, p.bind(py))?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/common.rs:92:34 [INFO] [stdout] | [INFO] [stdout] 92 | let default_port = match &*base_scheme { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `base_scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/common.rs:115:30 [INFO] [stdout] | [INFO] [stdout] 115 | let default_port = match &*scheme { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/client/async_client.rs:296:46 [INFO] [stdout] | [INFO] [stdout] 296 | let mut history_entries: Vec<(u16, Vec<(Vec, Vec)>, Vec, String)> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/client/common.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | items.get(i).map_or(false, |(name, _value)| name.to_lowercase() == *expected) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 198 - items.get(i).map_or(false, |(name, _value)| name.to_lowercase() == *expected) [INFO] [stdout] 198 + items.get(i).is_some_and(|(name, _value)| name.to_lowercase() == *expected) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/client/async_client.rs:480:29 [INFO] [stdout] | [INFO] [stdout] 480 | ... Ok(Py::new(py, response)?) [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] 480 - Ok(Py::new(py, response)?) [INFO] [stdout] 480 + Py::new(py, response) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/client/async_client.rs:695:21 [INFO] [stdout] | [INFO] [stdout] 695 | return Ok((Some((new_req, history)), None)); [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] 695 - return Ok((Some((new_req, history)), None)); [INFO] [stdout] 695 + Ok((Some((new_req, history)), None)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/client/common.rs:676:22 [INFO] [stdout] | [INFO] [stdout] 676 | let suffix = &pattern_host[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/client/common.rs:675:5 [INFO] [stdout] | [INFO] [stdout] 675 | if pattern_host.starts_with('*') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 675 ~ if let Some(suffix) = pattern_host.strip_prefix('*') { [INFO] [stdout] 676 ~ return url_host == suffix || url_host.ends_with(&format!(".{}", suffix)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/client/async_client_send.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub(crate) async fn _send_with_auth_flow( [INFO] [stdout] 13 | | start: Instant, [INFO] [stdout] 14 | | flow: Py, [INFO] [stdout] 15 | | original_req: Request, [INFO] [stdout] ... | [INFO] [stdout] 21 | | default_encoding: Option>, [INFO] [stdout] 22 | | ) -> PyResult> { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (21/7) [INFO] [stdout] --> src/client/sync_client.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn new( [INFO] [stdout] 59 | | py: Python<'_>, [INFO] [stdout] 60 | | auth: Option, [INFO] [stdout] 61 | | params: Option>, [INFO] [stdout] ... | [INFO] [stdout] 79 | | rate_limit: Option, [INFO] [stdout] 80 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/client/sync_client.rs:118:18 [INFO] [stdout] | [INFO] [stdout] 118 | .map(|a| { [INFO] [stdout] | __________________^ [INFO] [stdout] 119 | | if let AuthArg::Custom(p) = a { [INFO] [stdout] 120 | | Some(p) [INFO] [stdout] 121 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 124 | | }) [INFO] [stdout] 125 | | .flatten(), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 118 ~ .and_then(|a| { [INFO] [stdout] 119 + if let AuthArg::Custom(p) = a { [INFO] [stdout] 120 + Some(p) [INFO] [stdout] 121 + } else { [INFO] [stdout] 122 + None [INFO] [stdout] 123 + } [INFO] [stdout] 124 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/async_client_send.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 119 | / if resp_body_needed { [INFO] [stdout] 120 | | if response.content_bytes.is_none() { [INFO] [stdout] 121 | | Python::attach(|py| { [INFO] [stdout] 122 | | let resp_py = Py::new(py, response.clone())?; [INFO] [stdout] ... | [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 119 ~ if resp_body_needed [INFO] [stdout] 120 ~ && response.content_bytes.is_none() { [INFO] [stdout] 121 | Python::attach(|py| { [INFO] [stdout] ... [INFO] [stdout] 126 | })?; [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/client/async_client_send.rs:234:58 [INFO] [stdout] | [INFO] [stdout] 234 | .call_method1("build_request", (method, url)) [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 235 | | .map_err(|e| e)? [INFO] [stdout] | |___________________________^ help: remove the call to `map_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/client/sync_client.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 144 | / pub fn request( [INFO] [stdout] 145 | | &self, [INFO] [stdout] 146 | | py: Python<'_>, [INFO] [stdout] 147 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 159 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 160 | | ) -> PyResult { [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/client/sync_client.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | / ... match transport.borrow().send_fast_raw(py, method_reqwest, target_url, raw_headers, simple_body_bytes.as_deref(), None) { [INFO] [stdout] 235 | | ... Ok(mut response) => { [INFO] [stdout] 236 | | ... response.elapsed = Some(start.elapsed().as_secs_f64()); [INFO] [stdout] 237 | | ... response.lazy_request_method = Some(method.to_uppercase()); [INFO] [stdout] ... | [INFO] [stdout] 251 | | ... Err(_) => {} [INFO] [stdout] 252 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 234 ~ if let Ok(mut response) = transport.borrow().send_fast_raw(py, method_reqwest, target_url, raw_headers, simple_body_bytes.as_deref(), None) { [INFO] [stdout] 235 + response.elapsed = Some(start.elapsed().as_secs_f64()); [INFO] [stdout] 236 + response.lazy_request_method = Some(method.to_uppercase()); [INFO] [stdout] 237 + response.lazy_request_url = Some(target_url_str); [INFO] [stdout] 238 + [INFO] [stdout] 239 + if let Some(ref de) = self.default_encoding { [INFO] [stdout] 240 + response.default_encoding = de.clone_ref(py); [INFO] [stdout] 241 + } [INFO] [stdout] 242 + [INFO] [stdout] 243 + if log::log_enabled!(log::Level::Info) { [INFO] [stdout] 244 + log::info!(target: "httpxr", "HTTP Request: {} {} \"HTTP/1.1 {} {}\"", [INFO] [stdout] 245 + response.lazy_request_method.as_ref().unwrap(), response.lazy_request_url.as_ref().unwrap(), response.status_code, response.reason_phrase()); [INFO] [stdout] 246 + } [INFO] [stdout] 247 + [INFO] [stdout] 248 + return Ok(response); [INFO] [stdout] 249 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (16/7) [INFO] [stdout] --> src/client/async_client_send.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | / pub fn request<'py>( [INFO] [stdout] 250 | | &self, [INFO] [stdout] 251 | | py: Python<'py>, [INFO] [stdout] 252 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 265 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 266 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/sync_client.rs:288:54 [INFO] [stdout] | [INFO] [stdout] 288 | if !["http", "https", "ws", "wss"].contains(&&*scheme) [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/sync_client.rs:299:59 [INFO] [stdout] | [INFO] [stdout] 299 | if host.is_empty() && ["http", "https"].contains(&&*scheme) { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | / if body.is_none() [INFO] [stdout] 337 | | && content.is_none() [INFO] [stdout] 338 | | && data.is_none() [INFO] [stdout] 339 | | && files.is_none() [INFO] [stdout] ... | [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 341 ~ && ["POST", "PUT", "PATCH"].contains(&method_upper.as_str()) [INFO] [stdout] 342 ~ && !merged_headers.contains_header("content-length") [INFO] [stdout] 343 | && !merged_headers.contains_header("transfer-encoding") [INFO] [stdout] 344 | { [INFO] [stdout] 345 | merged_headers.set_header("content-length", "0"); [INFO] [stdout] 346 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/async_client_send.rs:509:58 [INFO] [stdout] | [INFO] [stdout] 509 | if !["http", "https", "ws", "wss"].contains(&&*scheme) && !has_mount { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/async_client_send.rs:516:59 [INFO] [stdout] | [INFO] [stdout] 516 | if host.is_empty() && ["http", "https"].contains(&&*scheme) { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_send.rs:675:5 [INFO] [stdout] | [INFO] [stdout] 675 | / fn get<'py>( [INFO] [stdout] 676 | | &self, [INFO] [stdout] 677 | | py: Python<'py>, [INFO] [stdout] 678 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 685 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 686 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/client/async_client_send.rs:690:37 [INFO] [stdout] | [INFO] [stdout] 690 | && (kwargs.is_none() || kwargs.map_or(true, |k| k.is_empty())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 690 - && (kwargs.is_none() || kwargs.map_or(true, |k| k.is_empty())); [INFO] [stdout] 690 + && (kwargs.is_none() || kwargs.is_none_or(|k| k.is_empty())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/client/async_client_send.rs:785:42 [INFO] [stdout] | [INFO] [stdout] 785 | let mut history: Vec<(u16, Vec<(Vec, Vec)>, Vec, String)> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/client/sync_client.rs:555:5 [INFO] [stdout] | [INFO] [stdout] 555 | / pub(crate) fn build_request( [INFO] [stdout] 556 | | &self, [INFO] [stdout] 557 | | py: Python<'_>, [INFO] [stdout] 558 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 568 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 569 | | ) -> PyResult { [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client.rs:605:9 [INFO] [stdout] | [INFO] [stdout] 605 | / if body.is_none() [INFO] [stdout] 606 | | && content.is_none() [INFO] [stdout] 607 | | && data.is_none() [INFO] [stdout] 608 | | && files.is_none() [INFO] [stdout] ... | [INFO] [stdout] 617 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 610 ~ && ["POST", "PUT", "PATCH"].contains(&method_upper.as_str()) [INFO] [stdout] 611 ~ && !merged_headers.contains_header("content-length") [INFO] [stdout] 612 | && !merged_headers.contains_header("transfer-encoding") [INFO] [stdout] 613 | { [INFO] [stdout] 614 | merged_headers.set_header("content-length", "0"); [INFO] [stdout] 615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/client/async_client_send.rs:945:29 [INFO] [stdout] | [INFO] [stdout] 945 | ... Ok(Py::new(py, response)?) [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] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 945 - Ok(Py::new(py, response)?) [INFO] [stdout] 945 + Py::new(py, response) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_methods.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / fn $name<'py>( [INFO] [stdout] 20 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 21 | | params: Option<&Bound<'_, PyAny>>, headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 22 | | cookies: Option<&Bound<'_, PyAny>>, follow_redirects: Option, [INFO] [stdout] 23 | | timeout: Option<&Bound<'_, PyAny>>, extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 24 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 25 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 62 | async_no_body_method!(head, "HEAD"); [INFO] [stdout] | ----------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_methods.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / fn $name<'py>( [INFO] [stdout] 20 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 21 | | params: Option<&Bound<'_, PyAny>>, headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 22 | | cookies: Option<&Bound<'_, PyAny>>, follow_redirects: Option, [INFO] [stdout] 23 | | timeout: Option<&Bound<'_, PyAny>>, extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 24 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 25 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 63 | async_no_body_method!(options, "OPTIONS"); [INFO] [stdout] | ----------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/async_client_methods.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / fn $name<'py>( [INFO] [stdout] 20 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 21 | | params: Option<&Bound<'_, PyAny>>, headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 22 | | cookies: Option<&Bound<'_, PyAny>>, follow_redirects: Option, [INFO] [stdout] 23 | | timeout: Option<&Bound<'_, PyAny>>, extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 24 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 25 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 64 | async_no_body_method!(delete, "DELETE"); [INFO] [stdout] | --------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/async_client_methods.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / fn $name<'py>( [INFO] [stdout] 43 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 44 | | content: Option<&Bound<'_, PyAny>>, data: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 45 | | files: Option<&Bound<'_, PyAny>>, json: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 49 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 50 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 65 | async_body_method!(post, "POST"); [INFO] [stdout] | -------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/async_client_methods.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / fn $name<'py>( [INFO] [stdout] 43 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 44 | | content: Option<&Bound<'_, PyAny>>, data: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 45 | | files: Option<&Bound<'_, PyAny>>, json: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 49 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 50 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 66 | async_body_method!(put, "PUT"); [INFO] [stdout] | ------------------------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 107 | sync_no_body_method!(get, "GET"); [INFO] [stdout] | -------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/async_client_methods.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | / fn $name<'py>( [INFO] [stdout] 43 | | &self, py: Python<'py>, url: &Bound<'_, PyAny>, [INFO] [stdout] 44 | | content: Option<&Bound<'_, PyAny>>, data: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 45 | | files: Option<&Bound<'_, PyAny>>, json: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 49 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 50 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 67 | async_body_method!(patch, "PATCH"); [INFO] [stdout] | ---------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `async_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 108 | sync_no_body_method!(head, "HEAD"); [INFO] [stdout] | ---------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 109 | sync_no_body_method!(options, "OPTIONS"); [INFO] [stdout] | ---------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/client/async_client_methods.rs:152:14 [INFO] [stdout] | [INFO] [stdout] 152 | .map(|t| Py::new(py, t.clone()).ok()) [INFO] [stdout] | ______________^ [INFO] [stdout] 153 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|t| Py::new(py, t.clone()).ok())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/client/async_client_methods.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / pub fn build_request( [INFO] [stdout] 190 | | &self, [INFO] [stdout] 191 | | py: Python<'_>, [INFO] [stdout] 192 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 201 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 202 | | ) -> PyResult { [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 110 | sync_no_body_method!(delete, "DELETE"); [INFO] [stdout] | -------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/client/async_client_methods.rs:304:40 [INFO] [stdout] | [INFO] [stdout] 304 | Ok(t) => t.bind(py).is(&transport.bind(py)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `transport.bind(py)` [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: you are needlessly cloning iterator elements [INFO] [stdout] --> src/client/async_client_methods.rs:315:14 [INFO] [stdout] | [INFO] [stdout] 315 | ).map(|b| b.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [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] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / fn $name( [INFO] [stdout] 53 | | &self, [INFO] [stdout] 54 | | py: Python<'_>, [INFO] [stdout] 55 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 66 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 67 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 111 | sync_body_method!(post, "POST"); [INFO] [stdout] | ------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/client/async_client_methods.rs:410:27 [INFO] [stdout] | [INFO] [stdout] 410 | ... let mut prepared: Vec<(String, String, Vec<(Vec, Vec)>, Option>, Option)> = Vec::with_ca... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / fn $name( [INFO] [stdout] 53 | | &self, [INFO] [stdout] 54 | | py: Python<'_>, [INFO] [stdout] 55 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 66 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 67 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 112 | sync_body_method!(put, "PUT"); [INFO] [stdout] | ----------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / fn $name( [INFO] [stdout] 53 | | &self, [INFO] [stdout] 54 | | py: Python<'_>, [INFO] [stdout] 55 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 66 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 67 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 113 | sync_body_method!(patch, "PATCH"); [INFO] [stdout] | --------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/client/async_client_methods.rs:638:21 [INFO] [stdout] | [INFO] [stdout] 638 | pattern.split("://").nth(1).map_or(false, |r| !r.is_empty()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 638 - pattern.split("://").nth(1).map_or(false, |r| !r.is_empty()), [INFO] [stdout] 638 + pattern.split("://").nth(1).is_some_and(|r| !r.is_empty()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | / fn $name( [INFO] [stdout] 127 | | slf: &Bound<'_, Self>, [INFO] [stdout] 128 | | url: &Bound<'_, PyAny>, [INFO] [stdout] 129 | | next_url: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 138 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 139 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] ... [INFO] [stdout] 167 | sync_paginate_method!(paginate_get, "GET"); [INFO] [stdout] | ------------------------------------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_paginate_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | / fn $name( [INFO] [stdout] 127 | | slf: &Bound<'_, Self>, [INFO] [stdout] 128 | | url: &Bound<'_, PyAny>, [INFO] [stdout] 129 | | next_url: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 138 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 139 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] ... [INFO] [stdout] 168 | sync_paginate_method!(paginate_post, "POST"); [INFO] [stdout] | -------------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_paginate_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client_send.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | / if resp_body_needed { [INFO] [stdout] 134 | | if response.content_bytes.is_none() { [INFO] [stdout] 135 | | let resp_py = Py::new(py, response.clone())?; [INFO] [stdout] 136 | | let _ = resp_py.call_method0(py, "read"); [INFO] [stdout] ... | [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 133 ~ if resp_body_needed [INFO] [stdout] 134 ~ && response.content_bytes.is_none() { [INFO] [stdout] 135 | let resp_py = Py::new(py, response.clone())?; [INFO] [stdout] 136 | let _ = resp_py.call_method0(py, "read"); [INFO] [stdout] 137 | response = resp_py.extract(py)?; [INFO] [stdout] 138 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client_send.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | / if redirect_method != "GET" && redirect_method != "HEAD" { [INFO] [stdout] 287 | | if current_request.stream.is_some() { [INFO] [stdout] 288 | | return Err(crate::exceptions::StreamConsumed::new_err( [INFO] [stdout] 289 | | "Cannot redirect request with streaming body", [INFO] [stdout] ... | [INFO] [stdout] 292 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 286 ~ if redirect_method != "GET" && redirect_method != "HEAD" [INFO] [stdout] 287 ~ && current_request.stream.is_some() { [INFO] [stdout] 288 | return Err(crate::exceptions::StreamConsumed::new_err( [INFO] [stdout] 289 | "Cannot redirect request with streaming body", [INFO] [stdout] 290 | )); [INFO] [stdout] 291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/client/sync_client_ext.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | / if let Ok(f) = v.extract::() { [INFO] [stdout] 135 | | Some(f) [INFO] [stdout] 136 | | } else { [INFO] [stdout] 137 | | None [INFO] [stdout] 138 | | } [INFO] [stdout] | |_________________^ help: replace with: `v.extract::().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_ext.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / fn paginate<'py>( [INFO] [stdout] 154 | | slf: &Bound<'py, Self>, [INFO] [stdout] 155 | | py: Python<'py>, [INFO] [stdout] 156 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 167 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 168 | | ) -> PyResult { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/common.rs:92:34 [INFO] [stdout] | [INFO] [stdout] 92 | let default_port = match &*base_scheme { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `base_scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_ext.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / fn gather_paginate( [INFO] [stdout] 216 | | &self, [INFO] [stdout] 217 | | py: Python<'_>, [INFO] [stdout] 218 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 225 | | extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 226 | | ) -> PyResult> { [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/common.rs:115:30 [INFO] [stdout] | [INFO] [stdout] 115 | let default_port = match &*scheme { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/client/sync_client_ext.rs:272:60 [INFO] [stdout] | [INFO] [stdout] 272 | .call_method1("build_request", (&method, &url)) [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 273 | | .map_err(|e| e)? [INFO] [stdout] | |___________________________^ help: remove the call to `map_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/client/sync_client_ext.rs:289:5 [INFO] [stdout] | [INFO] [stdout] 289 | / fn download( [INFO] [stdout] 290 | | &self, [INFO] [stdout] 291 | | py: Python<'_>, [INFO] [stdout] 292 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 298 | | chunk_size: usize, [INFO] [stdout] 299 | | ) -> PyResult { [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/client/common.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | items.get(i).map_or(false, |(name, _value)| name.to_lowercase() == *expected) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 198 - items.get(i).map_or(false, |(name, _value)| name.to_lowercase() == *expected) [INFO] [stdout] 198 + items.get(i).is_some_and(|(name, _value)| name.to_lowercase() == *expected) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/client/common.rs:676:22 [INFO] [stdout] | [INFO] [stdout] 676 | let suffix = &pattern_host[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/client/common.rs:675:5 [INFO] [stdout] | [INFO] [stdout] 675 | if pattern_host.starts_with('*') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 675 ~ if let Some(suffix) = pattern_host.strip_prefix('*') { [INFO] [stdout] 676 ~ return url_host == suffix || url_host.ends_with(&format!(".{}", suffix)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (21/7) [INFO] [stdout] --> src/client/sync_client.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn new( [INFO] [stdout] 59 | | py: Python<'_>, [INFO] [stdout] 60 | | auth: Option, [INFO] [stdout] 61 | | params: Option>, [INFO] [stdout] ... | [INFO] [stdout] 79 | | rate_limit: Option, [INFO] [stdout] 80 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/client/sync_client.rs:118:18 [INFO] [stdout] | [INFO] [stdout] 118 | .map(|a| { [INFO] [stdout] | __________________^ [INFO] [stdout] 119 | | if let AuthArg::Custom(p) = a { [INFO] [stdout] 120 | | Some(p) [INFO] [stdout] 121 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 124 | | }) [INFO] [stdout] 125 | | .flatten(), [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 118 ~ .and_then(|a| { [INFO] [stdout] 119 + if let AuthArg::Custom(p) = a { [INFO] [stdout] 120 + Some(p) [INFO] [stdout] 121 + } else { [INFO] [stdout] 122 + None [INFO] [stdout] 123 + } [INFO] [stdout] 124 ~ }), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (15/7) [INFO] [stdout] --> src/client/sync_client.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 144 | / pub fn request( [INFO] [stdout] 145 | | &self, [INFO] [stdout] 146 | | py: Python<'_>, [INFO] [stdout] 147 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 159 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 160 | | ) -> PyResult { [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/client/sync_client.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | / ... match transport.borrow().send_fast_raw(py, method_reqwest, target_url, raw_headers, simple_body_bytes.as_deref(), None) { [INFO] [stdout] 235 | | ... Ok(mut response) => { [INFO] [stdout] 236 | | ... response.elapsed = Some(start.elapsed().as_secs_f64()); [INFO] [stdout] 237 | | ... response.lazy_request_method = Some(method.to_uppercase()); [INFO] [stdout] ... | [INFO] [stdout] 251 | | ... Err(_) => {} [INFO] [stdout] 252 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 234 ~ if let Ok(mut response) = transport.borrow().send_fast_raw(py, method_reqwest, target_url, raw_headers, simple_body_bytes.as_deref(), None) { [INFO] [stdout] 235 + response.elapsed = Some(start.elapsed().as_secs_f64()); [INFO] [stdout] 236 + response.lazy_request_method = Some(method.to_uppercase()); [INFO] [stdout] 237 + response.lazy_request_url = Some(target_url_str); [INFO] [stdout] 238 + [INFO] [stdout] 239 + if let Some(ref de) = self.default_encoding { [INFO] [stdout] 240 + response.default_encoding = de.clone_ref(py); [INFO] [stdout] 241 + } [INFO] [stdout] 242 + [INFO] [stdout] 243 + if log::log_enabled!(log::Level::Info) { [INFO] [stdout] 244 + log::info!(target: "httpxr", "HTTP Request: {} {} \"HTTP/1.1 {} {}\"", [INFO] [stdout] 245 + response.lazy_request_method.as_ref().unwrap(), response.lazy_request_url.as_ref().unwrap(), response.status_code, response.reason_phrase()); [INFO] [stdout] 246 + } [INFO] [stdout] 247 + [INFO] [stdout] 248 + return Ok(response); [INFO] [stdout] 249 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/sync_client.rs:288:54 [INFO] [stdout] | [INFO] [stdout] 288 | if !["http", "https", "ws", "wss"].contains(&&*scheme) [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/client/sync_client.rs:299:59 [INFO] [stdout] | [INFO] [stdout] 299 | if host.is_empty() && ["http", "https"].contains(&&*scheme) { [INFO] [stdout] | ^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `scheme` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | / if body.is_none() [INFO] [stdout] 337 | | && content.is_none() [INFO] [stdout] 338 | | && data.is_none() [INFO] [stdout] 339 | | && files.is_none() [INFO] [stdout] ... | [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 341 ~ && ["POST", "PUT", "PATCH"].contains(&method_upper.as_str()) [INFO] [stdout] 342 ~ && !merged_headers.contains_header("content-length") [INFO] [stdout] 343 | && !merged_headers.contains_header("transfer-encoding") [INFO] [stdout] 344 | { [INFO] [stdout] 345 | merged_headers.set_header("content-length", "0"); [INFO] [stdout] 346 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `CStr::new` with a byte string literal [INFO] [stdout] --> src/config.rs:342:22 [INFO] [stdout] | [INFO] [stdout] 342 | let patch_code = CStr::from_bytes_with_nul( [INFO] [stdout] | ______________________^ [INFO] [stdout] 343 | | b"\ [INFO] [stdout] 344 | | def patch(ctx): [INFO] [stdout] 345 | | original_load = ctx.load_verify_locations [INFO] [stdout] ... | [INFO] [stdout] 354 | | .unwrap(); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] = note: `#[warn(clippy::manual_c_str_literals)]` on by default [INFO] [stdout] help: use a `c""` literal [INFO] [stdout] | [INFO] [stdout] 342 ~ let patch_code = c"\ [INFO] [stdout] 343 + def patch(ctx): [INFO] [stdout] 344 + original_load = ctx.load_verify_locations [INFO] [stdout] 345 + def load_verify_locations(cafile=None, capath=None, cadata=None): [INFO] [stdout] 346 + if cafile: [INFO] [stdout] 347 + ctx._cafile = cafile [INFO] [stdout] 348 + return original_load(cafile=cafile, capath=capath, cadata=cadata) [INFO] [stdout] 349 + ctx.load_verify_locations = load_verify_locations [INFO] [stdout] 350 + return ctx [INFO] [stdout] 351 ~ "; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/client/sync_client.rs:555:5 [INFO] [stdout] | [INFO] [stdout] 555 | / pub(crate) fn build_request( [INFO] [stdout] 556 | | &self, [INFO] [stdout] 557 | | py: Python<'_>, [INFO] [stdout] 558 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 568 | | timeout: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 569 | | ) -> PyResult { [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client.rs:605:9 [INFO] [stdout] | [INFO] [stdout] 605 | / if body.is_none() [INFO] [stdout] 606 | | && content.is_none() [INFO] [stdout] 607 | | && data.is_none() [INFO] [stdout] 608 | | && files.is_none() [INFO] [stdout] ... | [INFO] [stdout] 617 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 610 ~ && ["POST", "PUT", "PATCH"].contains(&method_upper.as_str()) [INFO] [stdout] 611 ~ && !merged_headers.contains_header("content-length") [INFO] [stdout] 612 | && !merged_headers.contains_header("transfer-encoding") [INFO] [stdout] 613 | { [INFO] [stdout] 614 | merged_headers.set_header("content-length", "0"); [INFO] [stdout] 615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 107 | sync_no_body_method!(get, "GET"); [INFO] [stdout] | -------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 108 | sync_no_body_method!(head, "HEAD"); [INFO] [stdout] | ---------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 109 | sync_no_body_method!(options, "OPTIONS"); [INFO] [stdout] | ---------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | / fn $name( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | py: Python<'_>, [INFO] [stdout] 23 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 30 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 31 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 110 | sync_no_body_method!(delete, "DELETE"); [INFO] [stdout] | -------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_no_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / fn $name( [INFO] [stdout] 53 | | &self, [INFO] [stdout] 54 | | py: Python<'_>, [INFO] [stdout] 55 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 66 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 67 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 111 | sync_body_method!(post, "POST"); [INFO] [stdout] | ------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / fn $name( [INFO] [stdout] 53 | | &self, [INFO] [stdout] 54 | | py: Python<'_>, [INFO] [stdout] 55 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 66 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 67 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 112 | sync_body_method!(put, "PUT"); [INFO] [stdout] | ----------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / fn $name( [INFO] [stdout] 53 | | &self, [INFO] [stdout] 54 | | py: Python<'_>, [INFO] [stdout] 55 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 66 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 67 | | ) -> PyResult { [INFO] [stdout] | |___________________________________^ [INFO] [stdout] ... [INFO] [stdout] 113 | sync_body_method!(patch, "PATCH"); [INFO] [stdout] | --------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_body_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | / fn $name( [INFO] [stdout] 127 | | slf: &Bound<'_, Self>, [INFO] [stdout] 128 | | url: &Bound<'_, PyAny>, [INFO] [stdout] 129 | | next_url: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 138 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 139 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] ... [INFO] [stdout] 167 | sync_paginate_method!(paginate_get, "GET"); [INFO] [stdout] | ------------------------------------------ in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_paginate_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/client/sync_client_methods.rs:126:13 [INFO] [stdout] | [INFO] [stdout] 126 | / fn $name( [INFO] [stdout] 127 | | slf: &Bound<'_, Self>, [INFO] [stdout] 128 | | url: &Bound<'_, PyAny>, [INFO] [stdout] 129 | | next_url: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 138 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 139 | | ) -> PyResult> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] ... [INFO] [stdout] 168 | sync_paginate_method!(paginate_post, "POST"); [INFO] [stdout] | -------------------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: this warning originates in the macro `sync_paginate_method` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client_send.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 133 | / if resp_body_needed { [INFO] [stdout] 134 | | if response.content_bytes.is_none() { [INFO] [stdout] 135 | | let resp_py = Py::new(py, response.clone())?; [INFO] [stdout] 136 | | let _ = resp_py.call_method0(py, "read"); [INFO] [stdout] ... | [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 133 ~ if resp_body_needed [INFO] [stdout] 134 ~ && response.content_bytes.is_none() { [INFO] [stdout] 135 | let resp_py = Py::new(py, response.clone())?; [INFO] [stdout] 136 | let _ = resp_py.call_method0(py, "read"); [INFO] [stdout] 137 | response = resp_py.extract(py)?; [INFO] [stdout] 138 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/client/sync_client_send.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | / if redirect_method != "GET" && redirect_method != "HEAD" { [INFO] [stdout] 287 | | if current_request.stream.is_some() { [INFO] [stdout] 288 | | return Err(crate::exceptions::StreamConsumed::new_err( [INFO] [stdout] 289 | | "Cannot redirect request with streaming body", [INFO] [stdout] ... | [INFO] [stdout] 292 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 286 ~ if redirect_method != "GET" && redirect_method != "HEAD" [INFO] [stdout] 287 ~ && current_request.stream.is_some() { [INFO] [stdout] 288 | return Err(crate::exceptions::StreamConsumed::new_err( [INFO] [stdout] 289 | "Cannot redirect request with streaming body", [INFO] [stdout] 290 | )); [INFO] [stdout] 291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/client/sync_client_ext.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | / if let Ok(f) = v.extract::() { [INFO] [stdout] 135 | | Some(f) [INFO] [stdout] 136 | | } else { [INFO] [stdout] 137 | | None [INFO] [stdout] 138 | | } [INFO] [stdout] | |_________________^ help: replace with: `v.extract::().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (14/7) [INFO] [stdout] --> src/client/sync_client_ext.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / fn paginate<'py>( [INFO] [stdout] 154 | | slf: &Bound<'py, Self>, [INFO] [stdout] 155 | | py: Python<'py>, [INFO] [stdout] 156 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 167 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 168 | | ) -> PyResult { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/client/sync_client_ext.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / fn gather_paginate( [INFO] [stdout] 216 | | &self, [INFO] [stdout] 217 | | py: Python<'_>, [INFO] [stdout] 218 | | method: &str, [INFO] [stdout] ... | [INFO] [stdout] 225 | | extensions: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 226 | | ) -> PyResult> { [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/client/sync_client_ext.rs:272:60 [INFO] [stdout] | [INFO] [stdout] 272 | .call_method1("build_request", (&method, &url)) [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 273 | | .map_err(|e| e)? [INFO] [stdout] | |___________________________^ help: remove the call to `map_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/client/sync_client_ext.rs:289:5 [INFO] [stdout] | [INFO] [stdout] 289 | / fn download( [INFO] [stdout] 290 | | &self, [INFO] [stdout] 291 | | py: Python<'_>, [INFO] [stdout] 292 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 298 | | chunk_size: usize, [INFO] [stdout] 299 | | ) -> PyResult { [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/models/headers.rs:328:59 [INFO] [stdout] | [INFO] [stdout] 328 | let tuple = pyo3::types::PyTuple::new(py, &[k_obj.as_any(), v_obj.as_any()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[k_obj.as_any(), v_obj.as_any()]` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/models/headers.rs:340:55 [INFO] [stdout] | [INFO] [stdout] 340 | let tuple = pyo3::types::PyTuple::new(py, &[k_obj.as_any(), v_obj.as_any()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[k_obj.as_any(), v_obj.as_any()]` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/headers.rs:410:13 [INFO] [stdout] | [INFO] [stdout] 410 | / if String::from_utf8_lossy(k).to_lowercase() == key_lower { [INFO] [stdout] 411 | | if first_idx.is_none() { [INFO] [stdout] 412 | | first_idx = Some(i); [INFO] [stdout] 413 | | } [INFO] [stdout] 414 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 410 ~ if String::from_utf8_lossy(k).to_lowercase() == key_lower [INFO] [stdout] 411 ~ && first_idx.is_none() { [INFO] [stdout] 412 | first_idx = Some(i); [INFO] [stdout] 413 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/models/request.rs:266:16 [INFO] [stdout] | [INFO] [stdout] 266 | if !f.is_none() && !(files_empty && data_empty) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(f.is_none() || files_empty && data_empty)` [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 function has too many arguments (11/7) [INFO] [stdout] --> src/models/request.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | / fn new( [INFO] [stdout] 95 | | py: Python<'_>, [INFO] [stdout] 96 | | method: &str, [INFO] [stdout] 97 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 105 | | extensions: Option>, [INFO] [stdout] 106 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/request.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | / if body.is_some() && !hdrs.contains_header("content-type") { [INFO] [stdout] 312 | | if data_for_encoding.is_some() { [INFO] [stdout] 313 | | hdrs.set_header("content-type", "application/x-www-form-urlencoded"); [INFO] [stdout] 314 | | } [INFO] [stdout] 315 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 311 ~ if body.is_some() && !hdrs.contains_header("content-type") [INFO] [stdout] 312 ~ && data_for_encoding.is_some() { [INFO] [stdout] 313 | hdrs.set_header("content-type", "application/x-www-form-urlencoded"); [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/request.rs:325:16 [INFO] [stdout] | [INFO] [stdout] 325 | } else if stream_obj.is_none() [INFO] [stdout] | ________________^ [INFO] [stdout] 326 | | && ["POST", "PUT", "PATCH", "DELETE"].contains(&method_upper.as_str()) [INFO] [stdout] 327 | | { [INFO] [stdout] 328 | | if !hdrs.contains_header("content-length") && !hdrs.contains_header("transfer-encoding") [INFO] [stdout] ... | [INFO] [stdout] 332 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 326 ~ && ["POST", "PUT", "PATCH", "DELETE"].contains(&method_upper.as_str()) [INFO] [stdout] 327 ~ && !hdrs.contains_header("content-length") && !hdrs.contains_header("transfer-encoding") [INFO] [stdout] 328 | { [INFO] [stdout] 329 | hdrs.set_header("content-length", "0"); [INFO] [stdout] 330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `CStr::new` with a byte string literal [INFO] [stdout] --> src/config.rs:342:22 [INFO] [stdout] | [INFO] [stdout] 342 | let patch_code = CStr::from_bytes_with_nul( [INFO] [stdout] | ______________________^ [INFO] [stdout] 343 | | b"\ [INFO] [stdout] 344 | | def patch(ctx): [INFO] [stdout] 345 | | original_load = ctx.load_verify_locations [INFO] [stdout] ... | [INFO] [stdout] 354 | | .unwrap(); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals [INFO] [stdout] = note: `#[warn(clippy::manual_c_str_literals)]` on by default [INFO] [stdout] help: use a `c""` literal [INFO] [stdout] | [INFO] [stdout] 342 ~ let patch_code = c"\ [INFO] [stdout] 343 + def patch(ctx): [INFO] [stdout] 344 + original_load = ctx.load_verify_locations [INFO] [stdout] 345 + def load_verify_locations(cafile=None, capath=None, cadata=None): [INFO] [stdout] 346 + if cafile: [INFO] [stdout] 347 + ctx._cafile = cafile [INFO] [stdout] 348 + return original_load(cafile=cafile, capath=capath, cadata=cadata) [INFO] [stdout] 349 + ctx.load_verify_locations = load_verify_locations [INFO] [stdout] 350 + return ctx [INFO] [stdout] 351 ~ "; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/models/response.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / fn new( [INFO] [stdout] 358 | | py: Python<'_>, [INFO] [stdout] 359 | | status_code: u16, [INFO] [stdout] 360 | | headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 369 | | history: Option>, [INFO] [stdout] 370 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `pyo3::Bound<'_, pyo3::PyAny>` [INFO] [stdout] --> src/models/response_properties.rs:222:35 [INFO] [stdout] | [INFO] [stdout] 222 | Err(PyErr::from_value(exc.into())) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `exc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/models/headers.rs:328:59 [INFO] [stdout] | [INFO] [stdout] 328 | let tuple = pyo3::types::PyTuple::new(py, &[k_obj.as_any(), v_obj.as_any()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[k_obj.as_any(), v_obj.as_any()]` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/models/headers.rs:340:55 [INFO] [stdout] | [INFO] [stdout] 340 | let tuple = pyo3::types::PyTuple::new(py, &[k_obj.as_any(), v_obj.as_any()])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[k_obj.as_any(), v_obj.as_any()]` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/multipart.rs:290:59 [INFO] [stdout] | [INFO] [stdout] 290 | } else if read_res.cast::().is_ok() { [INFO] [stdout] | ___________________________________________________________^ [INFO] [stdout] 291 | | return Err(PyTypeError::new_err("Expected bytes, got str")); [INFO] [stdout] 292 | | } else if read_res.extract::().is_ok() { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/multipart.rs:292:60 [INFO] [stdout] | [INFO] [stdout] 292 | } else if read_res.extract::().is_ok() { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 293 | | return Err(PyTypeError::new_err("Expected bytes, got str")); [INFO] [stdout] 294 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/multipart.rs:295:17 [INFO] [stdout] | [INFO] [stdout] 295 | / if let Ok(b) = read_res.extract::>() { [INFO] [stdout] 296 | | b [INFO] [stdout] 297 | | } else { [INFO] [stdout] 298 | | Vec::new() [INFO] [stdout] 299 | | } [INFO] [stdout] | |_________________^ help: ascribe the type std::vec::Vec and replace your expression with: `read_res.extract::>().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/headers.rs:410:13 [INFO] [stdout] | [INFO] [stdout] 410 | / if String::from_utf8_lossy(k).to_lowercase() == key_lower { [INFO] [stdout] 411 | | if first_idx.is_none() { [INFO] [stdout] 412 | | first_idx = Some(i); [INFO] [stdout] 413 | | } [INFO] [stdout] 414 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 410 ~ if String::from_utf8_lossy(k).to_lowercase() == key_lower [INFO] [stdout] 411 ~ && first_idx.is_none() { [INFO] [stdout] 412 | first_idx = Some(i); [INFO] [stdout] 413 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/multipart.rs:479:49 [INFO] [stdout] | [INFO] [stdout] 479 | crate::models::Headers::create(Some(&d.as_any()), "utf-8") [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `d.as_any()` [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/models/request.rs:266:16 [INFO] [stdout] | [INFO] [stdout] 266 | if !f.is_none() && !(files_empty && data_empty) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(f.is_none() || files_empty && data_empty)` [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 function has too many arguments (11/7) [INFO] [stdout] --> src/models/request.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | / fn new( [INFO] [stdout] 95 | | py: Python<'_>, [INFO] [stdout] 96 | | method: &str, [INFO] [stdout] 97 | | url: &Bound<'_, PyAny>, [INFO] [stdout] ... | [INFO] [stdout] 105 | | extensions: Option>, [INFO] [stdout] 106 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/request.rs:311:9 [INFO] [stdout] | [INFO] [stdout] 311 | / if body.is_some() && !hdrs.contains_header("content-type") { [INFO] [stdout] 312 | | if data_for_encoding.is_some() { [INFO] [stdout] 313 | | hdrs.set_header("content-type", "application/x-www-form-urlencoded"); [INFO] [stdout] 314 | | } [INFO] [stdout] 315 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 311 ~ if body.is_some() && !hdrs.contains_header("content-type") [INFO] [stdout] 312 ~ && data_for_encoding.is_some() { [INFO] [stdout] 313 | hdrs.set_header("content-type", "application/x-www-form-urlencoded"); [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/models/request.rs:325:16 [INFO] [stdout] | [INFO] [stdout] 325 | } else if stream_obj.is_none() [INFO] [stdout] | ________________^ [INFO] [stdout] 326 | | && ["POST", "PUT", "PATCH", "DELETE"].contains(&method_upper.as_str()) [INFO] [stdout] 327 | | { [INFO] [stdout] 328 | | if !hdrs.contains_header("content-length") && !hdrs.contains_header("transfer-encoding") [INFO] [stdout] ... | [INFO] [stdout] 332 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 326 ~ && ["POST", "PUT", "PATCH", "DELETE"].contains(&method_upper.as_str()) [INFO] [stdout] 327 ~ && !hdrs.contains_header("content-length") && !hdrs.contains_header("transfer-encoding") [INFO] [stdout] 328 | { [INFO] [stdout] 329 | hdrs.set_header("content-length", "0"); [INFO] [stdout] 330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/transports/default.rs:259:38 [INFO] [stdout] | [INFO] [stdout] 259 | let tuple = PyTuple::new(py, &[ [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 260 | | status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 261 | | dict.as_any().as_borrowed(), [INFO] [stdout] 262 | | body_py.as_any().as_borrowed(), [INFO] [stdout] 263 | | ])?; [INFO] [stdout] | |_________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 259 ~ let tuple = PyTuple::new(py, [ [INFO] [stdout] 260 + status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 261 + dict.as_any().as_borrowed(), [INFO] [stdout] 262 + body_py.as_any().as_borrowed(), [INFO] [stdout] 263 ~ ])?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/default.rs:388:22 [INFO] [stdout] | [INFO] [stdout] 388 | let results: Vec, Vec)>, Vec), String>> = py [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/default.rs:451:19 [INFO] [stdout] | [INFO] [stdout] 451 | requests: &[(reqwest::Method, String, Option>, Option>, Option)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/default.rs:479:22 [INFO] [stdout] | [INFO] [stdout] 479 | let results: Vec)>, Vec), String>> = py [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/models/response.rs:357:5 [INFO] [stdout] | [INFO] [stdout] 357 | / fn new( [INFO] [stdout] 358 | | py: Python<'_>, [INFO] [stdout] 359 | | status_code: u16, [INFO] [stdout] 360 | | headers: Option<&Bound<'_, PyAny>>, [INFO] [stdout] ... | [INFO] [stdout] 369 | | history: Option>, [INFO] [stdout] 370 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `pyo3::Bound<'_, pyo3::PyAny>` [INFO] [stdout] --> src/models/response_properties.rs:222:35 [INFO] [stdout] | [INFO] [stdout] 222 | Err(PyErr::from_value(exc.into())) [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `exc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/helpers.rs:174:14 [INFO] [stdout] | [INFO] [stdout] 174 | results: Vec)>, Vec), String>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/transports/helpers.rs:190:46 [INFO] [stdout] | [INFO] [stdout] 190 | let tuple = PyTuple::new(py, &[ [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 191 | | status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 192 | | dict.as_any().as_borrowed(), [INFO] [stdout] 193 | | body_py.as_any().as_borrowed(), [INFO] [stdout] 194 | | ])?; [INFO] [stdout] | |_________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 190 ~ let tuple = PyTuple::new(py, [ [INFO] [stdout] 191 + status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 192 + dict.as_any().as_borrowed(), [INFO] [stdout] 193 + body_py.as_any().as_borrowed(), [INFO] [stdout] 194 ~ ])?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/multipart.rs:290:59 [INFO] [stdout] | [INFO] [stdout] 290 | } else if read_res.cast::().is_ok() { [INFO] [stdout] | ___________________________________________________________^ [INFO] [stdout] 291 | | return Err(PyTypeError::new_err("Expected bytes, got str")); [INFO] [stdout] 292 | | } else if read_res.extract::().is_ok() { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/multipart.rs:292:60 [INFO] [stdout] | [INFO] [stdout] 292 | } else if read_res.extract::().is_ok() { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 293 | | return Err(PyTypeError::new_err("Expected bytes, got str")); [INFO] [stdout] 294 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/multipart.rs:295:17 [INFO] [stdout] | [INFO] [stdout] 295 | / if let Ok(b) = read_res.extract::>() { [INFO] [stdout] 296 | | b [INFO] [stdout] 297 | | } else { [INFO] [stdout] 298 | | Vec::new() [INFO] [stdout] 299 | | } [INFO] [stdout] | |_________________^ help: ascribe the type std::vec::Vec and replace your expression with: `read_res.extract::>().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` 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/multipart.rs:479:49 [INFO] [stdout] | [INFO] [stdout] 479 | crate::models::Headers::create(Some(&d.as_any()), "utf-8") [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `d.as_any()` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | / if !value.is_none() { [INFO] [stdout] 291 | | result.scheme = value.extract()?; [INFO] [stdout] 292 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 289 ~ "scheme" [INFO] [stdout] 290 ~ if !value.is_none() => { [INFO] [stdout] 291 | result.scheme = value.extract()?; [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:295:25 [INFO] [stdout] | [INFO] [stdout] 295 | / if !value.is_none() { [INFO] [stdout] 296 | | result.userinfo = value.extract()?; [INFO] [stdout] 297 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 294 ~ "userinfo" [INFO] [stdout] 295 ~ if !value.is_none() => { [INFO] [stdout] 296 | result.userinfo = value.extract()?; [INFO] [stdout] 297 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | / if !value.is_none() { [INFO] [stdout] 301 | | result.host = value.extract()?; [INFO] [stdout] 302 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 299 ~ "host" [INFO] [stdout] 300 ~ if !value.is_none() => { [INFO] [stdout] 301 | result.host = value.extract()?; [INFO] [stdout] 302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | / if !value.is_none() { [INFO] [stdout] 313 | | result.path = value.extract()?; [INFO] [stdout] 314 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 311 ~ "path" [INFO] [stdout] 312 ~ if !value.is_none() => { [INFO] [stdout] 313 | result.path = value.extract()?; [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/urlparse.rs:384:15 [INFO] [stdout] | [INFO] [stdout] 384 | .find(|c| c == '/' || c == '?' || c == '#') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['/', '?', '#']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:452:13 [INFO] [stdout] | [INFO] [stdout] 452 | (c >= '\u{2600}' && c <= '\u{26FF}') || // Misc Symbols (e.g. Snowman) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{2600}'..='\u{26FF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | (c >= '\u{1F000}' && c <= '\u{1FFFF}') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{1F000}'..='\u{1FFFF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/urlparse.rs:541:13 [INFO] [stdout] | [INFO] [stdout] 539 | / let u = url::Url::parse(&dummy) [INFO] [stdout] 540 | | .map_err(|e| crate::exceptions::InvalidURL::new_err(e.to_string()))?; [INFO] [stdout] | |_____________________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 541 | u [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 539 ~ [INFO] [stdout] 540 ~ url::Url::parse(&dummy) [INFO] [stdout] 541 + .map_err(|e| crate::exceptions::InvalidURL::new_err(e.to_string()))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/transports/default.rs:259:38 [INFO] [stdout] | [INFO] [stdout] 259 | let tuple = PyTuple::new(py, &[ [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 260 | | status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 261 | | dict.as_any().as_borrowed(), [INFO] [stdout] 262 | | body_py.as_any().as_borrowed(), [INFO] [stdout] 263 | | ])?; [INFO] [stdout] | |_________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 259 ~ let tuple = PyTuple::new(py, [ [INFO] [stdout] 260 + status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 261 + dict.as_any().as_borrowed(), [INFO] [stdout] 262 + body_py.as_any().as_borrowed(), [INFO] [stdout] 263 ~ ])?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/urlparse.rs:678:25 [INFO] [stdout] | [INFO] [stdout] 678 | format!("Invalid URL: empty host") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Invalid URL: empty host".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | (c >= '\u{2600}' && c <= '\u{26FF}') || // Misc Symbols (e.g. Snowman) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{2600}'..='\u{26FF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:714:17 [INFO] [stdout] | [INFO] [stdout] 714 | (c >= '\u{1F000}' && c <= '\u{1FFFF}') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{1F000}'..='\u{1FFFF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/default.rs:388:22 [INFO] [stdout] | [INFO] [stdout] 388 | let results: Vec, Vec)>, Vec), String>> = py [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/urlparse.rs:734:24 [INFO] [stdout] | [INFO] [stdout] 734 | let rest = &url_str[3..]; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/urlparse.rs:733:34 [INFO] [stdout] | [INFO] [stdout] 733 | let has_explicit_slash = if url_str.starts_with("://") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 733 ~ let has_explicit_slash = if let Some(rest) = url_str.strip_prefix("://") { [INFO] [stdout] 734 ~ rest.find('/').is_some() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/default.rs:451:19 [INFO] [stdout] | [INFO] [stdout] 451 | requests: &[(reqwest::Method, String, Option>, Option>, Option)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/default.rs:479:22 [INFO] [stdout] | [INFO] [stdout] 479 | let results: Vec)>, Vec), String>> = py [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `URL` contains a capitalized acronym [INFO] [stdout] --> src/urls.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | pub struct URL { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/urls.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | port_part[1..].parse::().ok() [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/urls.rs:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let p = if port_part.starts_with(':') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 103 ~ let p = if let Some() = port_part.strip_prefix(':') { [INFO] [stdout] 104 ~ .parse::().ok() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `urls::URL` [INFO] [stdout] --> src/urls.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / pub fn to_string(&self) -> String { [INFO] [stdout] 153 | | self.parsed.to_url_string() [INFO] [stdout] 154 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `urls::URL` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transports/helpers.rs:174:14 [INFO] [stdout] | [INFO] [stdout] 174 | results: Vec)>, Vec), String>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/urls.rs:229:24 [INFO] [stdout] | [INFO] [stdout] 229 | if let Err(_) = j.set_host(Some(base_host)) { [INFO] [stdout] | -------^^^^^^------------------------------ help: try: `if j.set_host(Some(base_host)).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/transports/helpers.rs:190:46 [INFO] [stdout] | [INFO] [stdout] 190 | let tuple = PyTuple::new(py, &[ [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 191 | | status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 192 | | dict.as_any().as_borrowed(), [INFO] [stdout] 193 | | body_py.as_any().as_borrowed(), [INFO] [stdout] 194 | | ])?; [INFO] [stdout] | |_________________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 190 ~ let tuple = PyTuple::new(py, [ [INFO] [stdout] 191 + status.into_pyobject(py)?.into_any().as_borrowed(), [INFO] [stdout] 192 + dict.as_any().as_borrowed(), [INFO] [stdout] 193 + body_py.as_any().as_borrowed(), [INFO] [stdout] 194 ~ ])?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/urls.rs:316:5 [INFO] [stdout] | [INFO] [stdout] 316 | / pub fn new( [INFO] [stdout] 317 | | url: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 318 | | params: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 319 | | scheme: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 326 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 327 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/urls.rs:416:48 [INFO] [stdout] | [INFO] [stdout] 416 | return Err(InvalidURL::new_err(format!( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 417 | | "Invalid URL component 'scheme'" [INFO] [stdout] 418 | | ))); [INFO] [stdout] | |_________________^ help: consider using `.to_string()`: `"Invalid URL component 'scheme'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/urls.rs:541:14 [INFO] [stdout] | [INFO] [stdout] 541 | .unwrap_or_else(String::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/urls.rs:540:18 [INFO] [stdout] | [INFO] [stdout] 540 | .map(|s| percent_decode(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `percent_decode` [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/urls.rs:560:33 [INFO] [stdout] | [INFO] [stdout] 560 | self.get_password().map(|s| percent_decode(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `percent_decode` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | / if !value.is_none() { [INFO] [stdout] 291 | | result.scheme = value.extract()?; [INFO] [stdout] 292 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 289 ~ "scheme" [INFO] [stdout] 290 ~ if !value.is_none() => { [INFO] [stdout] 291 | result.scheme = value.extract()?; [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:295:25 [INFO] [stdout] | [INFO] [stdout] 295 | / if !value.is_none() { [INFO] [stdout] 296 | | result.userinfo = value.extract()?; [INFO] [stdout] 297 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 294 ~ "userinfo" [INFO] [stdout] 295 ~ if !value.is_none() => { [INFO] [stdout] 296 | result.userinfo = value.extract()?; [INFO] [stdout] 297 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | / if !value.is_none() { [INFO] [stdout] 301 | | result.host = value.extract()?; [INFO] [stdout] 302 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 299 ~ "host" [INFO] [stdout] 300 ~ if !value.is_none() => { [INFO] [stdout] 301 | result.host = value.extract()?; [INFO] [stdout] 302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/urlparse.rs:312:25 [INFO] [stdout] | [INFO] [stdout] 312 | / if !value.is_none() { [INFO] [stdout] 313 | | result.path = value.extract()?; [INFO] [stdout] 314 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 311 ~ "path" [INFO] [stdout] 312 ~ if !value.is_none() => { [INFO] [stdout] 313 | result.path = value.extract()?; [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/urlparse.rs:384:15 [INFO] [stdout] | [INFO] [stdout] 384 | .find(|c| c == '/' || c == '?' || c == '#') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['/', '?', '#']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:452:13 [INFO] [stdout] | [INFO] [stdout] 452 | (c >= '\u{2600}' && c <= '\u{26FF}') || // Misc Symbols (e.g. Snowman) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{2600}'..='\u{26FF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | (c >= '\u{1F000}' && c <= '\u{1FFFF}') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{1F000}'..='\u{1FFFF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/urlparse.rs:541:13 [INFO] [stdout] | [INFO] [stdout] 539 | / let u = url::Url::parse(&dummy) [INFO] [stdout] 540 | | .map_err(|e| crate::exceptions::InvalidURL::new_err(e.to_string()))?; [INFO] [stdout] | |_____________________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 541 | u [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 539 ~ [INFO] [stdout] 540 ~ url::Url::parse(&dummy) [INFO] [stdout] 541 + .map_err(|e| crate::exceptions::InvalidURL::new_err(e.to_string()))? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/urlparse.rs:678:25 [INFO] [stdout] | [INFO] [stdout] 678 | format!("Invalid URL: empty host") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Invalid URL: empty host".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:713:21 [INFO] [stdout] | [INFO] [stdout] 713 | (c >= '\u{2600}' && c <= '\u{26FF}') || // Misc Symbols (e.g. Snowman) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{2600}'..='\u{26FF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/urlparse.rs:714:17 [INFO] [stdout] | [INFO] [stdout] 714 | (c >= '\u{1F000}' && c <= '\u{1FFFF}') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('\u{1F000}'..='\u{1FFFF}').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/urlparse.rs:734:24 [INFO] [stdout] | [INFO] [stdout] 734 | let rest = &url_str[3..]; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/urlparse.rs:733:34 [INFO] [stdout] | [INFO] [stdout] 733 | let has_explicit_slash = if url_str.starts_with("://") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 733 ~ let has_explicit_slash = if let Some(rest) = url_str.strip_prefix("://") { [INFO] [stdout] 734 ~ rest.find('/').is_some() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `URL` contains a capitalized acronym [INFO] [stdout] --> src/urls.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | pub struct URL { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/urls.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | port_part[1..].parse::().ok() [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/urls.rs:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let p = if port_part.starts_with(':') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 103 ~ let p = if let Some() = port_part.strip_prefix(':') { [INFO] [stdout] 104 ~ .parse::().ok() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `urls::URL` [INFO] [stdout] --> src/urls.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / pub fn to_string(&self) -> String { [INFO] [stdout] 153 | | self.parsed.to_url_string() [INFO] [stdout] 154 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `urls::URL` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/urls.rs:229:24 [INFO] [stdout] | [INFO] [stdout] 229 | if let Err(_) = j.set_host(Some(base_host)) { [INFO] [stdout] | -------^^^^^^------------------------------ help: try: `if j.set_host(Some(base_host)).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/urls.rs:316:5 [INFO] [stdout] | [INFO] [stdout] 316 | / pub fn new( [INFO] [stdout] 317 | | url: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 318 | | params: Option<&Bound<'_, PyAny>>, [INFO] [stdout] 319 | | scheme: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 326 | | kwargs: Option<&Bound<'_, PyDict>>, [INFO] [stdout] 327 | | ) -> PyResult { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/urls.rs:416:48 [INFO] [stdout] | [INFO] [stdout] 416 | return Err(InvalidURL::new_err(format!( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 417 | | "Invalid URL component 'scheme'" [INFO] [stdout] 418 | | ))); [INFO] [stdout] | |_________________^ help: consider using `.to_string()`: `"Invalid URL component 'scheme'".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/urls.rs:541:14 [INFO] [stdout] | [INFO] [stdout] 541 | .unwrap_or_else(String::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/urls.rs:540:18 [INFO] [stdout] | [INFO] [stdout] 540 | .map(|s| percent_decode(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `percent_decode` [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/urls.rs:560:33 [INFO] [stdout] | [INFO] [stdout] 560 | self.get_password().map(|s| percent_decode(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `percent_decode` [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 1m 07s [INFO] running `Command { std: "docker" "inspect" "c36dd2b781ab8ada155d6e9851caa7f919ec91fc46d066117795d259cb2c70bc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c36dd2b781ab8ada155d6e9851caa7f919ec91fc46d066117795d259cb2c70bc", kill_on_drop: false }` [INFO] [stdout] c36dd2b781ab8ada155d6e9851caa7f919ec91fc46d066117795d259cb2c70bc