[INFO] fetching crate yamlbase 0.7.2... [INFO] linting yamlbase-0.7.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate yamlbase 0.7.2 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate yamlbase 0.7.2 [INFO] finished tweaking crates.io crate yamlbase 0.7.2 [INFO] tweaked toml for crates.io crate yamlbase 0.7.2 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate yamlbase 0.7.2 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate yamlbase 0.7.2 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 btoi v0.4.3 [INFO] [stderr] Downloaded notify-debouncer-mini v0.4.1 [INFO] [stderr] Downloaded io-enum v1.2.0 [INFO] [stderr] Downloaded mysql-common-derive v0.31.2 [INFO] [stderr] Downloaded saturating v0.1.0 [INFO] [stderr] Downloaded frunk_derives v0.4.3 [INFO] [stderr] Downloaded pem v3.0.5 [INFO] [stderr] Downloaded mysql v25.0.1 [INFO] [stderr] Downloaded frunk v0.4.3 [INFO] [stderr] Downloaded subprocess v0.2.9 [INFO] [stderr] Downloaded frunk_core v0.4.3 [INFO] [stderr] Downloaded rust_decimal v1.37.1 [INFO] [stderr] Downloaded bigdecimal v0.4.8 [INFO] [stderr] Downloaded frunk_proc_macros v0.1.3 [INFO] [stderr] Downloaded sqlparser v0.52.0 [INFO] [stderr] Downloaded whoami v1.6.0 [INFO] [stderr] Downloaded postgres v0.19.10 [INFO] [stderr] Downloaded rust_decimal_macros v1.37.1 [INFO] [stderr] Downloaded named_pipe v0.4.1 [INFO] [stderr] Downloaded frunk_proc_macro_helpers v0.1.3 [INFO] [stderr] Downloaded mysql_common v0.32.4 [INFO] [stderr] Downloaded bufstream v0.1.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5578a486e81f5112829e321ce821ced2d9ebf2291ec4b3184e761ed8f3a69514 [INFO] running `Command { std: "docker" "start" "-a" "5578a486e81f5112829e321ce821ced2d9ebf2291ec4b3184e761ed8f3a69514", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5578a486e81f5112829e321ce821ced2d9ebf2291ec4b3184e761ed8f3a69514", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5578a486e81f5112829e321ce821ced2d9ebf2291ec4b3184e761ed8f3a69514", kill_on_drop: false }` [INFO] [stdout] 5578a486e81f5112829e321ce821ced2d9ebf2291ec4b3184e761ed8f3a69514 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a719e214454147ca55b938863d6df29e901feb3c64c0a7b66ed999466c3f5396 [INFO] running `Command { std: "docker" "start" "-a" "a719e214454147ca55b938863d6df29e901feb3c64c0a7b66ed999466c3f5396", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.102 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Compiling crunchy v0.2.3 [INFO] [stderr] Checking hashbrown v0.15.4 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking unicode-properties v0.1.3 [INFO] [stderr] Checking unicode-bidi v0.3.18 [INFO] [stderr] Checking anstyle-parse v0.2.7 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Compiling frunk_core v0.4.3 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking colorchoice v1.0.4 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Compiling rust_decimal v1.37.1 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Compiling cc v1.2.26 [INFO] [stderr] Compiling itertools v0.10.5 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking inotify-sys v0.1.5 [INFO] [stderr] Checking stringprep v0.1.5 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking tracing-core v0.1.34 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Checking inotify v0.9.6 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Checking hashlink v0.8.4 [INFO] [stderr] Checking clap_builder v4.5.40 [INFO] [stderr] Checking dlv-list v0.5.2 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking ordered-multimap v0.7.3 [INFO] [stderr] Checking filetime v0.2.25 [INFO] [stderr] Compiling subprocess v0.2.9 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling bigdecimal v0.4.8 [INFO] [stderr] Compiling proc-macro-error-attr2 v2.0.0 [INFO] [stderr] Checking minimal-lexical v0.2.1 [INFO] [stderr] Checking arraydeque v0.5.1 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Checking rust-ini v0.20.0 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Checking convert_case v0.6.0 [INFO] [stderr] Checking notify v6.1.1 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking half v2.6.0 [INFO] [stderr] Checking postgres-protocol v0.6.8 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking pathdiff v0.2.3 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Compiling termcolor v1.4.1 [INFO] [stderr] Checking ciborium-io v0.2.2 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Checking notify-debouncer-mini v0.4.1 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking yaml-rust2 v0.8.1 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking btoi v0.4.3 [INFO] [stderr] Checking sqlparser v0.52.0 [INFO] [stderr] Checking crossbeam-queue v0.3.12 [INFO] [stderr] Checking cast v0.3.0 [INFO] [stderr] Checking saturating v0.1.0 [INFO] [stderr] Compiling mysql v25.0.1 [INFO] [stderr] Checking md5 v0.7.0 [INFO] [stderr] Compiling libz-sys v1.1.22 [INFO] [stderr] Compiling zstd-sys v2.0.15+zstd.1.5.7 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Checking whoami v1.6.0 [INFO] [stderr] Checking twox-hash v1.6.3 [INFO] [stderr] Checking crossbeam v0.8.4 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking pem v3.0.5 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking bufstream v0.1.4 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking anes v0.1.6 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking oorandom v11.1.5 [INFO] [stderr] Checking yansi v1.0.1 [INFO] [stderr] Checking pretty_assertions v1.4.1 [INFO] [stderr] Compiling proc-macro-crate v3.3.0 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling frunk_proc_macro_helpers v0.1.3 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling bindgen v0.72.0 [INFO] [stderr] Compiling proc-macro-error2 v2.0.1 [INFO] [stderr] Compiling derive_utils v0.15.0 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling tracing-attributes v0.1.29 [INFO] [stderr] Checking tokio v1.45.1 [INFO] [stderr] Compiling clap_derive v4.5.40 [INFO] [stderr] Compiling frunk_proc_macros v0.1.3 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling frunk_derives v0.4.3 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling pest v2.8.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling rust_decimal_macros v1.37.1 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling io-enum v1.2.0 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking frunk v0.4.3 [INFO] [stderr] Compiling pest_meta v2.8.0 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling mysql-common-derive v0.31.2 [INFO] [stderr] Checking async-stream v0.3.6 [INFO] [stderr] Checking clap v4.5.40 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Compiling pest_generator v2.8.0 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Compiling pest_derive v2.8.0 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking tokio-test v0.4.4 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Compiling mysql_common v0.32.4 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking json5 v0.4.1 [INFO] [stderr] Checking humantime-serde v1.1.1 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking ron v0.8.1 [INFO] [stderr] Checking rustix v1.0.7 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking postgres-types v0.2.9 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking tokio-postgres v0.7.13 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking config v0.14.1 [INFO] [stderr] Checking postgres v0.19.10 [INFO] [stderr] Checking yamlbase v0.7.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `tracing::debug` [INFO] [stdout] --> src/protocol/postgres_catalog.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use tracing::debug; [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: `tracing::debug` [INFO] [stdout] --> src/protocol/postgres_catalog.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use tracing::debug; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/database/storage.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / if let Some(table_index) = self.primary_key_index.get(table_name) { [INFO] [stdout] 69 | | if let Some(row_idx) = table_index.get(pk_value) { [INFO] [stdout] 70 | | let db = self.database.read().await; [INFO] [stdout] 71 | | if let Some(table) = db.get_table(table_name) { [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [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] 68 ~ if let Some(table_index) = self.primary_key_index.get(table_name) [INFO] [stdout] 69 ~ && let Some(row_idx) = table_index.get(pk_value) { [INFO] [stdout] 70 | let db = self.database.read().await; [INFO] [stdout] ... [INFO] [stdout] 73 | } [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Statement::Query(query) = statement { [INFO] [stdout] 92 | | if let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 93 | | let order_by_exprs = query.order_by.iter() [INFO] [stdout] 94 | | .flat_map(|ob| ob.exprs.iter()) [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [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] 91 ~ if let Statement::Query(query) = statement [INFO] [stdout] 92 ~ && let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 93 | let order_by_exprs = query.order_by.iter() [INFO] [stdout] ... [INFO] [stdout] 97 | return self.handle_select(select, query.limit.as_ref(), &order_by_exprs); [INFO] [stdout] 98 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:452:9 [INFO] [stdout] | [INFO] [stdout] 452 | / if projection.len() == 1 { [INFO] [stdout] 453 | | if let SelectItem::Wildcard(_) = &projection[0] { [INFO] [stdout] 454 | | return Ok(result); [INFO] [stdout] 455 | | } [INFO] [stdout] 456 | | } [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] 452 ~ if projection.len() == 1 [INFO] [stdout] 453 ~ && let SelectItem::Wildcard(_) = &projection[0] { [INFO] [stdout] 454 | return Ok(result); [INFO] [stdout] 455 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:530:9 [INFO] [stdout] | [INFO] [stdout] 530 | / if let Expr::Value(sqlparser::ast::Value::Number(n, _)) = limit_expr { [INFO] [stdout] 531 | | if let Ok(limit) = n.parse::() { [INFO] [stdout] 532 | | result.rows.truncate(limit); [INFO] [stdout] 533 | | } [INFO] [stdout] 534 | | } [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] 530 ~ if let Expr::Value(sqlparser::ast::Value::Number(n, _)) = limit_expr [INFO] [stdout] 531 ~ && let Ok(limit) = n.parse::() { [INFO] [stdout] 532 | result.rows.truncate(limit); [INFO] [stdout] 533 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:615:13 [INFO] [stdout] | [INFO] [stdout] 615 | / if let Some(Value::Text(relkind)) = row.get(15) { [INFO] [stdout] 616 | | if relkind == "r" { [INFO] [stdout] 617 | | // Check relnamespace (column 2) [INFO] [stdout] 618 | | if let Some(Value::Integer(ns_oid)) = row.get(2) { [INFO] [stdout] ... | [INFO] [stdout] 627 | | } [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] 615 ~ if let Some(Value::Text(relkind)) = row.get(15) [INFO] [stdout] 616 ~ && relkind == "r" { [INFO] [stdout] 617 | // Check relnamespace (column 2) [INFO] [stdout] ... [INFO] [stdout] 625 | } [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:618:21 [INFO] [stdout] | [INFO] [stdout] 618 | / if let Some(Value::Integer(ns_oid)) = row.get(2) { [INFO] [stdout] 619 | | if *ns_oid == 2200 { // public namespace [INFO] [stdout] 620 | | // Get relname (column 1) [INFO] [stdout] 621 | | if let Some(Value::Text(relname)) = row.get(1) { [INFO] [stdout] ... | [INFO] [stdout] 625 | | } [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] 618 ~ if let Some(Value::Integer(ns_oid)) = row.get(2) [INFO] [stdout] 619 ~ && *ns_oid == 2200 { // public namespace [INFO] [stdout] 620 | // Get relname (column 1) [INFO] [stdout] ... [INFO] [stdout] 623 | } [INFO] [stdout] 624 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:706:13 [INFO] [stdout] | [INFO] [stdout] 706 | / if let (Some(Value::Text(name)), Some(Value::Integer(oid))) = (row.get(1), row.get(0)) { [INFO] [stdout] 707 | | if name == &table_name { [INFO] [stdout] 708 | | table_oid = *oid; [INFO] [stdout] 709 | | break; [INFO] [stdout] 710 | | } [INFO] [stdout] 711 | | } [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] 706 ~ if let (Some(Value::Text(name)), Some(Value::Integer(oid))) = (row.get(1), row.get(0)) [INFO] [stdout] 707 ~ && name == &table_name { [INFO] [stdout] 708 | table_oid = *oid; [INFO] [stdout] 709 | break; [INFO] [stdout] 710 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:706:88 [INFO] [stdout] | [INFO] [stdout] 706 | if let (Some(Value::Text(name)), Some(Value::Integer(oid))) = (row.get(1), row.get(0)) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:718:13 [INFO] [stdout] | [INFO] [stdout] 718 | / if let Some(Value::Integer(attrelid)) = row.get(0) { [INFO] [stdout] 719 | | if *attrelid == table_oid { [INFO] [stdout] 720 | | // Extract column info [INFO] [stdout] 721 | | let name = row.get(1).map(|v| v.to_string()).unwrap_or_default(); [INFO] [stdout] ... | [INFO] [stdout] 759 | | } [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] 718 ~ if let Some(Value::Integer(attrelid)) = row.get(0) [INFO] [stdout] 719 ~ && *attrelid == table_oid { [INFO] [stdout] 720 | // Extract column info [INFO] [stdout] ... [INFO] [stdout] 757 | ]); [INFO] [stdout] 758 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:718:53 [INFO] [stdout] | [INFO] [stdout] 718 | if let Some(Value::Integer(attrelid)) = row.get(0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:727:21 [INFO] [stdout] | [INFO] [stdout] 727 | / if let Ok(num) = attnum.parse::() { [INFO] [stdout] 728 | | if num <= 0 { [INFO] [stdout] 729 | | continue; [INFO] [stdout] 730 | | } [INFO] [stdout] 731 | | } [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] 727 ~ if let Ok(num) = attnum.parse::() [INFO] [stdout] 728 ~ && num <= 0 { [INFO] [stdout] 729 | continue; [INFO] [stdout] 730 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attr_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:835:22 [INFO] [stdout] | [INFO] [stdout] 835 | (attr_row.get(0), attr_row.get(5)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `attr_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:845:25 [INFO] [stdout] | [INFO] [stdout] 845 | / if let (Some(Value::Integer(oid)), Some(Value::Text(relname))) = [INFO] [stdout] 846 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 847 | | [INFO] [stdout] 848 | | if *oid == *attrelid { [INFO] [stdout] ... | [INFO] [stdout] 922 | | } [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] 846 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 847 | [INFO] [stdout] 848 ~ && *oid == *attrelid { [INFO] [stdout] 849 | // Check WHERE conditions if any [INFO] [stdout] ... [INFO] [stdout] 920 | break; // Found the matching class row [INFO] [stdout] 921 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:846:30 [INFO] [stdout] | [INFO] [stdout] 846 | ... (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:872:33 [INFO] [stdout] | [INFO] [stdout] 872 | / ... if query_lower.contains("where") && query_lower.contains("attrelid") { [INFO] [stdout] 873 | | ... if let Some(idx) = query_lower.find("attrelid = ") { [INFO] [stdout] 874 | | ... let after = &query[idx + 11..]; [INFO] [stdout] 875 | | ... let num_str: String = after.chars() [INFO] [stdout] ... | [INFO] [stdout] 884 | | ... } [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] 872 ~ if query_lower.contains("where") && query_lower.contains("attrelid") [INFO] [stdout] 873 ~ && let Some(idx) = query_lower.find("attrelid = ") { [INFO] [stdout] 874 | let after = &query[idx + 11..]; [INFO] [stdout] ... [INFO] [stdout] 882 | } [INFO] [stdout] 883 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:878:41 [INFO] [stdout] | [INFO] [stdout] 878 | / ... if let Ok(target_oid) = num_str.parse::() { [INFO] [stdout] 879 | | ... if *attrelid != target_oid { [INFO] [stdout] 880 | | ... include = false; [INFO] [stdout] 881 | | ... } [INFO] [stdout] 882 | | ... } [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] 878 ~ if let Ok(target_oid) = num_str.parse::() [INFO] [stdout] 879 ~ && *attrelid != target_oid { [INFO] [stdout] 880 | include = false; [INFO] [stdout] 881 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1007:17 [INFO] [stdout] | [INFO] [stdout] 1007 | / if let (Some(Value::Integer(oid)), Some(Value::Text(relname))) = [INFO] [stdout] 1008 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 1009 | | if relname == &table { [INFO] [stdout] 1010 | | table_oid = Some(*oid); [INFO] [stdout] ... | [INFO] [stdout] 1013 | | } [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] 1008 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 1009 ~ && relname == &table { [INFO] [stdout] 1010 | table_oid = Some(*oid); [INFO] [stdout] 1011 | break; [INFO] [stdout] 1012 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1008:22 [INFO] [stdout] | [INFO] [stdout] 1008 | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attr_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1024:26 [INFO] [stdout] | [INFO] [stdout] 1024 | (attr_row.get(0), attr_row.get(1), attr_row.get(2), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `attr_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1130:17 [INFO] [stdout] | [INFO] [stdout] 1130 | / if let (Some(Value::Integer(row_oid)), Some(Value::Text(relname))) = [INFO] [stdout] 1131 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 1132 | | if relname == table { [INFO] [stdout] 1133 | | oid = Some(*row_oid); [INFO] [stdout] ... | [INFO] [stdout] 1136 | | } [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] 1131 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 1132 ~ && relname == table { [INFO] [stdout] 1133 | oid = Some(*row_oid); [INFO] [stdout] 1134 | break; [INFO] [stdout] 1135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1131:22 [INFO] [stdout] | [INFO] [stdout] 1131 | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `constraint_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1150:18 [INFO] [stdout] | [INFO] [stdout] 1150 | (constraint_row.get(0), constraint_row.get(1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `constraint_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1159:17 [INFO] [stdout] | [INFO] [stdout] 1159 | / if let Some(target_oid) = table_oid { [INFO] [stdout] 1160 | | if *conrelid != target_oid { [INFO] [stdout] 1161 | | continue; [INFO] [stdout] 1162 | | } [INFO] [stdout] 1163 | | } [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] 1159 ~ if let Some(target_oid) = table_oid [INFO] [stdout] 1160 ~ && *conrelid != target_oid { [INFO] [stdout] 1161 | continue; [INFO] [stdout] 1162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1170:21 [INFO] [stdout] | [INFO] [stdout] 1170 | / if let (Some(Value::Integer(class_oid)), Some(Value::Text(relname))) = [INFO] [stdout] 1171 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 1172 | | if *class_oid == *confrelid { [INFO] [stdout] 1173 | | ref_table_name = relname.clone(); [INFO] [stdout] ... | [INFO] [stdout] 1176 | | } [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] 1171 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 1172 ~ && *class_oid == *confrelid { [INFO] [stdout] 1173 | ref_table_name = relname.clone(); [INFO] [stdout] 1174 | break; [INFO] [stdout] 1175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1171:26 [INFO] [stdout] | [INFO] [stdout] 1171 | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1216:18 [INFO] [stdout] | [INFO] [stdout] 1216 | (class_row.get(0), class_row.get(1), class_row.get(15)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attr_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1233:26 [INFO] [stdout] | [INFO] [stdout] 1233 | (attr_row.get(0), attr_row.get(1), attr_row.get(2), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `attr_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1299:9 [INFO] [stdout] | [INFO] [stdout] 1299 | / if let Statement::Query(query) = statement { [INFO] [stdout] 1300 | | if let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 1301 | | // Check if this is a catalog table query [INFO] [stdout] 1302 | | if let Some(table_ref) = select.from.first() { [INFO] [stdout] ... | [INFO] [stdout] 1370 | | } [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] 1299 ~ if let Statement::Query(query) = statement [INFO] [stdout] 1300 ~ && let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 1301 | // Check if this is a catalog table query [INFO] [stdout] ... [INFO] [stdout] 1368 | } [INFO] [stdout] 1369 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1302:17 [INFO] [stdout] | [INFO] [stdout] 1302 | / if let Some(table_ref) = select.from.first() { [INFO] [stdout] 1303 | | if let TableFactor::Table { name, .. } = &table_ref.relation { [INFO] [stdout] 1304 | | let table_name = name.0.iter() [INFO] [stdout] 1305 | | .map(|ident| ident.value.as_str()) [INFO] [stdout] ... | [INFO] [stdout] 1368 | | } [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] 1302 ~ if let Some(table_ref) = select.from.first() [INFO] [stdout] 1303 ~ && let TableFactor::Table { name, .. } = &table_ref.relation { [INFO] [stdout] 1304 | let table_name = name.0.iter() [INFO] [stdout] ... [INFO] [stdout] 1366 | } [INFO] [stdout] 1367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1312:25 [INFO] [stdout] | [INFO] [stdout] 1312 | / if select.from.len() > 1 || select.from.iter().any(|t| { [INFO] [stdout] 1313 | | if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] 1314 | | true [INFO] [stdout] 1315 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 1324 | | } [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] 1312 ~ if (select.from.len() > 1 || select.from.iter().any(|t| { [INFO] [stdout] 1313 | if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] ... [INFO] [stdout] 1317 | } [INFO] [stdout] 1318 ~ })) { [INFO] [stdout] 1319 ~ && (table_name.contains("pg_attribute") || table_name.contains("pg_class")) { [INFO] [stdout] 1320 | debug!("Detected catalog JOIN in parsed statement"); [INFO] [stdout] 1321 | // For now, return all table columns for SQLAlchemy compatibility [INFO] [stdout] 1322 | return Ok(Some(self.get_all_table_columns()?)); [INFO] [stdout] 1323 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/protocol/catalog_router.rs:1313:29 [INFO] [stdout] | [INFO] [stdout] 1313 | / ... if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] 1314 | | ... true [INFO] [stdout] 1315 | | ... } else { [INFO] [stdout] 1316 | | ... false [INFO] [stdout] 1317 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 1313 - if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] 1314 - true [INFO] [stdout] 1315 - } else { [INFO] [stdout] 1316 - false [INFO] [stdout] 1317 - } [INFO] [stdout] 1313 + matches!(&t.relation, TableFactor::Table { .. }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/protocol/catalog_router.rs:1384:61 [INFO] [stdout] | [INFO] [stdout] 1384 | if self.evaluate_where_for_pg_class(where_expr, &row) { [INFO] [stdout] | ^^^^ help: change this to: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/protocol/catalog_router.rs:1395:9 [INFO] [stdout] | [INFO] [stdout] 1395 | / match expr { [INFO] [stdout] 1396 | | Expr::BinaryOp { left, op, right } => { [INFO] [stdout] 1397 | | match op { [INFO] [stdout] 1398 | | BinaryOperator::Eq => { [INFO] [stdout] ... | [INFO] [stdout] 1429 | | _ => {} [INFO] [stdout] 1430 | | } [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] 1395 ~ if let Expr::BinaryOp { left, op, right } = expr { [INFO] [stdout] 1396 + match op { [INFO] [stdout] 1397 + BinaryOperator::Eq => { [INFO] [stdout] 1398 + // Check if it's relname = 'something' or relkind = 'something' [INFO] [stdout] 1399 + if let (Expr::Identifier(ident), Expr::Value(sqlparser::ast::Value::SingleQuotedString(value))) = [INFO] [stdout] 1400 + (left.as_ref(), right.as_ref()) { [INFO] [stdout] 1401 + [INFO] [stdout] 1402 + let col_name = ident.value.to_lowercase(); [INFO] [stdout] 1403 + match col_name.as_str() { [INFO] [stdout] 1404 + "relname" => { [INFO] [stdout] 1405 + // relname is column 1 [INFO] [stdout] 1406 + if let Some(Value::Text(relname)) = row.get(1) { [INFO] [stdout] 1407 + return relname == value; [INFO] [stdout] 1408 + } [INFO] [stdout] 1409 + } [INFO] [stdout] 1410 + "relkind" => { [INFO] [stdout] 1411 + // relkind is column 2 [INFO] [stdout] 1412 + if let Some(Value::Text(relkind)) = row.get(2) { [INFO] [stdout] 1413 + return relkind == value; [INFO] [stdout] 1414 + } [INFO] [stdout] 1415 + } [INFO] [stdout] 1416 + _ => {} [INFO] [stdout] 1417 + } [INFO] [stdout] 1418 + } [INFO] [stdout] 1419 + } [INFO] [stdout] 1420 + BinaryOperator::And => { [INFO] [stdout] 1421 + // Evaluate both sides [INFO] [stdout] 1422 + return self.evaluate_where_for_pg_class(left, row) && [INFO] [stdout] 1423 + self.evaluate_where_for_pg_class(right, row); [INFO] [stdout] 1424 + } [INFO] [stdout] 1425 + _ => {} [INFO] [stdout] 1426 + } [INFO] [stdout] 1427 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/mysql.rs:496:9 [INFO] [stdout] | [INFO] [stdout] 496 | / if let Ok(handled) = self.system_variables.handle_set_command(query_trimmed) { [INFO] [stdout] 497 | | if handled { [INFO] [stdout] 498 | | return self.send_ok(stream, state, 0, 0).await; [INFO] [stdout] 499 | | } [INFO] [stdout] 500 | | } [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] 496 ~ if let Ok(handled) = self.system_variables.handle_set_command(query_trimmed) [INFO] [stdout] 497 ~ && handled { [INFO] [stdout] 498 | return self.send_ok(stream, state, 0, 0).await; [INFO] [stdout] 499 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/mysql_functions.rs:817:9 [INFO] [stdout] | [INFO] [stdout] 817 | / if let Ok(parts) = parts { [INFO] [stdout] 818 | | if parts.len() == 4 && parts.iter().all(|&p| p <= 255) { [INFO] [stdout] 819 | | let result = (parts[0] << 24) + (parts[1] << 16) + (parts[2] << 8) + parts[3]; [INFO] [stdout] 820 | | return Ok(Value::Integer(result as i64)); [INFO] [stdout] 821 | | } [INFO] [stdout] 822 | | } [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] 817 ~ if let Ok(parts) = parts [INFO] [stdout] 818 ~ && parts.len() == 4 && parts.iter().all(|&p| p <= 255) { [INFO] [stdout] 819 | let result = (parts[0] << 24) + (parts[1] << 16) + (parts[2] << 8) + parts[3]; [INFO] [stdout] 820 | return Ok(Value::Integer(result as i64)); [INFO] [stdout] 821 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `table_oid` is used as a loop counter [INFO] [stdout] --> src/protocol/postgres.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | for (table_name, table) in &db.tables { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (table_oid, (table_name, table)) in (16384..).zip((&db.tables).into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_catalog.rs:685:13 [INFO] [stdout] | [INFO] [stdout] 685 | / if let Some(where_clause) = where_clause { [INFO] [stdout] 686 | | if where_clause.contains("relkind = 'r'") && pg_class.relkind != 'r' { [INFO] [stdout] 687 | | continue; [INFO] [stdout] 688 | | } [INFO] [stdout] 689 | | } [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] 685 ~ if let Some(where_clause) = where_clause [INFO] [stdout] 686 ~ && where_clause.contains("relkind = 'r'") && pg_class.relkind != 'r' { [INFO] [stdout] 687 | continue; [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | / if parameter_types.is_empty() && !parsed_statements.is_empty() { [INFO] [stdout] 121 | | if let Statement::Query(query_ref) = &parsed_statements[0] { [INFO] [stdout] 122 | | let inferred_types = infer_parameter_types(query_ref); [INFO] [stdout] 123 | | debug!("Inferred {} parameters from query", inferred_types.len()); [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [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] 120 ~ if parameter_types.is_empty() && !parsed_statements.is_empty() [INFO] [stdout] 121 ~ && let Statement::Query(query_ref) = &parsed_statements[0] { [INFO] [stdout] 122 | let inferred_types = infer_parameter_types(query_ref); [INFO] [stdout] 123 | debug!("Inferred {} parameters from query", inferred_types.len()); [INFO] [stdout] 124 | parameter_types = inferred_types; [INFO] [stdout] 125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:666:17 [INFO] [stdout] | [INFO] [stdout] 666 | / if let Some(table) = select.from.first() { [INFO] [stdout] 667 | | if let Some(table_name) = get_table_name_from_relation(&table.relation) { [INFO] [stdout] 668 | | if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] ... | [INFO] [stdout] 677 | | } [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] 666 ~ if let Some(table) = select.from.first() [INFO] [stdout] 667 ~ && let Some(table_name) = get_table_name_from_relation(&table.relation) { [INFO] [stdout] 668 | if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] ... [INFO] [stdout] 675 | } [INFO] [stdout] 676 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:667:21 [INFO] [stdout] | [INFO] [stdout] 667 | / if let Some(table_name) = get_table_name_from_relation(&table.relation) { [INFO] [stdout] 668 | | if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] 670 | | for col in &table.columns { [INFO] [stdout] ... | [INFO] [stdout] 676 | | } [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] 667 ~ if let Some(table_name) = get_table_name_from_relation(&table.relation) [INFO] [stdout] 668 ~ && let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] ... [INFO] [stdout] 674 | } [INFO] [stdout] 675 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:668:25 [INFO] [stdout] | [INFO] [stdout] 668 | / if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] 670 | | for col in &table.columns { [INFO] [stdout] 671 | | columns.push(col.name.clone()); [INFO] [stdout] ... | [INFO] [stdout] 675 | | } [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] 668 ~ if let Ok(db) = executor.storage().database().try_read() [INFO] [stdout] 669 ~ && let Some(table) = db.get_table(&table_name) { [INFO] [stdout] 670 | for col in &table.columns { [INFO] [stdout] ... [INFO] [stdout] 673 | } [INFO] [stdout] 674 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:897:5 [INFO] [stdout] | [INFO] [stdout] 897 | / if let sqlparser::ast::SetExpr::Select(select) = &mut *query.body { [INFO] [stdout] 898 | | if let Some(selection) = &mut select.selection { [INFO] [stdout] 899 | | substitute_parameters_in_expr(selection, parameters)?; [INFO] [stdout] 900 | | } [INFO] [stdout] 901 | | } [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] 897 ~ if let sqlparser::ast::SetExpr::Select(select) = &mut *query.body [INFO] [stdout] 898 ~ && let Some(selection) = &mut select.selection { [INFO] [stdout] 899 | substitute_parameters_in_expr(selection, parameters)?; [INFO] [stdout] 900 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1042:21 [INFO] [stdout] | [INFO] [stdout] 1042 | / if let Expr::Value(SqlValue::Placeholder(s)) = &**left { [INFO] [stdout] 1043 | | if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1044 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | | if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] ... | [INFO] [stdout] 1050 | | } [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] 1042 ~ if let Expr::Value(SqlValue::Placeholder(s)) = &**left [INFO] [stdout] 1043 ~ && let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1044 | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] ... [INFO] [stdout] 1048 | } [INFO] [stdout] 1049 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1043:25 [INFO] [stdout] | [INFO] [stdout] 1043 | / if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1044 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | | if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] ... | [INFO] [stdout] 1049 | | } [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] 1043 ~ if let Some(num_str) = s.strip_prefix('$') [INFO] [stdout] 1044 ~ && let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1047 | } [INFO] [stdout] 1048 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1044:29 [INFO] [stdout] | [INFO] [stdout] 1044 | / ... if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | | ... if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | | ... parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1047 | | ... } [INFO] [stdout] 1048 | | ... } [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] 1044 ~ if let Ok(param_num) = num_str.parse::() [INFO] [stdout] 1045 ~ && let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1047 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1051:21 [INFO] [stdout] | [INFO] [stdout] 1051 | / if let Expr::Value(SqlValue::Placeholder(s)) = &**right { [INFO] [stdout] 1052 | | if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1053 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | | if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] ... | [INFO] [stdout] 1059 | | } [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] 1051 ~ if let Expr::Value(SqlValue::Placeholder(s)) = &**right [INFO] [stdout] 1052 ~ && let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1053 | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] ... [INFO] [stdout] 1057 | } [INFO] [stdout] 1058 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1052:25 [INFO] [stdout] | [INFO] [stdout] 1052 | / if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1053 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | | if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] ... | [INFO] [stdout] 1058 | | } [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] 1052 ~ if let Some(num_str) = s.strip_prefix('$') [INFO] [stdout] 1053 ~ && let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1056 | } [INFO] [stdout] 1057 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1053:29 [INFO] [stdout] | [INFO] [stdout] 1053 | / ... if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | | ... if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | | ... parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1056 | | ... } [INFO] [stdout] 1057 | | ... } [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] 1053 ~ if let Ok(param_num) = num_str.parse::() [INFO] [stdout] 1054 ~ && let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1056 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `table_oid` is used as a loop counter [INFO] [stdout] --> src/protocol/shared_catalog.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for (table_name, table) in &db.tables { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (table_oid, (table_name, table)) in (16384..).zip((&db.tables).into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1330:9 [INFO] [stdout] | [INFO] [stdout] 1330 | / if let Expr::BinaryOp { left, op, right } = where_expr { [INFO] [stdout] 1331 | | if matches!(op, BinaryOperator::Eq) { [INFO] [stdout] 1332 | | // Check if left side is the primary key column [INFO] [stdout] 1333 | | if let Expr::Identifier(ident) = left.as_ref() { [INFO] [stdout] ... | [INFO] [stdout] 1350 | | } [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] 1330 ~ if let Expr::BinaryOp { left, op, right } = where_expr [INFO] [stdout] 1331 ~ && matches!(op, BinaryOperator::Eq) { [INFO] [stdout] 1332 | // Check if left side is the primary key column [INFO] [stdout] ... [INFO] [stdout] 1348 | } [INFO] [stdout] 1349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1333:17 [INFO] [stdout] | [INFO] [stdout] 1333 | / if let Expr::Identifier(ident) = left.as_ref() { [INFO] [stdout] 1334 | | if ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1335 | | // Extract the value from the right side [INFO] [stdout] 1336 | | if let Expr::Value(sql_value) = right.as_ref() { [INFO] [stdout] ... | [INFO] [stdout] 1340 | | } [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] 1333 ~ if let Expr::Identifier(ident) = left.as_ref() [INFO] [stdout] 1334 ~ && ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1335 | // Extract the value from the right side [INFO] [stdout] ... [INFO] [stdout] 1338 | } [INFO] [stdout] 1339 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1342:17 [INFO] [stdout] | [INFO] [stdout] 1342 | / if let Expr::Identifier(ident) = right.as_ref() { [INFO] [stdout] 1343 | | if ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1344 | | if let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] ... | [INFO] [stdout] 1348 | | } [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] 1342 ~ if let Expr::Identifier(ident) = right.as_ref() [INFO] [stdout] 1343 ~ && ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1344 | if let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] 1346 | } [INFO] [stdout] 1347 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1343:21 [INFO] [stdout] | [INFO] [stdout] 1343 | / if ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1344 | | if let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] 1346 | | } [INFO] [stdout] 1347 | | } [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] 1343 ~ if ident.value.to_lowercase() == pk_column.to_lowercase() [INFO] [stdout] 1344 ~ && let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] 1346 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1546:13 [INFO] [stdout] | [INFO] [stdout] 1546 | / if let Value::Text(s) = &low_value { [INFO] [stdout] 1547 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1548 | | low_value = Value::Date(date); [INFO] [stdout] 1549 | | } [INFO] [stdout] 1550 | | } [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] 1546 ~ if let Value::Text(s) = &low_value [INFO] [stdout] 1547 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1548 | low_value = Value::Date(date); [INFO] [stdout] 1549 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1551:13 [INFO] [stdout] | [INFO] [stdout] 1551 | / if let Value::Text(s) = &high_value { [INFO] [stdout] 1552 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1553 | | high_value = Value::Date(date); [INFO] [stdout] 1554 | | } [INFO] [stdout] 1555 | | } [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] 1551 ~ if let Value::Text(s) = &high_value [INFO] [stdout] 1552 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1553 | high_value = Value::Date(date); [INFO] [stdout] 1554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1593:13 [INFO] [stdout] | [INFO] [stdout] 1593 | / if let Value::Text(s) = &low_value { [INFO] [stdout] 1594 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1595 | | low_value = Value::Date(date); [INFO] [stdout] 1596 | | } [INFO] [stdout] 1597 | | } [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] 1593 ~ if let Value::Text(s) = &low_value [INFO] [stdout] 1594 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1595 | low_value = Value::Date(date); [INFO] [stdout] 1596 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1598:13 [INFO] [stdout] | [INFO] [stdout] 1598 | / if let Value::Text(s) = &high_value { [INFO] [stdout] 1599 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1600 | | high_value = Value::Date(date); [INFO] [stdout] 1601 | | } [INFO] [stdout] 1602 | | } [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] 1598 ~ if let Value::Text(s) = &high_value [INFO] [stdout] 1599 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1600 | high_value = Value::Date(date); [INFO] [stdout] 1601 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:3062:13 [INFO] [stdout] | [INFO] [stdout] 3062 | / if let ProjectionItem::Expression(_, expr) = item { [INFO] [stdout] 3063 | | if let Some(window_result) = [INFO] [stdout] 3064 | | self.evaluate_window_function_for_all_rows(expr, rows, table)? [INFO] [stdout] ... | [INFO] [stdout] 3071 | | } [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] 3062 ~ if let ProjectionItem::Expression(_, expr) = item [INFO] [stdout] 3063 ~ && let Some(window_result) = [INFO] [stdout] 3064 | self.evaluate_window_function_for_all_rows(expr, rows, table)? [INFO] [stdout] ... [INFO] [stdout] 3069 | } [INFO] [stdout] 3070 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:3232:17 [INFO] [stdout] | [INFO] [stdout] 3232 | / if let Expr::Identifier(ident) = &order_expr.expr { [INFO] [stdout] 3233 | | if let Some(&idx) = col_map.get(ident.value.as_str()) { [INFO] [stdout] 3234 | | if let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] 3235 | | let ord = if order_expr.asc.unwrap_or(true) { [INFO] [stdout] ... | [INFO] [stdout] 3245 | | } [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] 3232 ~ if let Expr::Identifier(ident) = &order_expr.expr [INFO] [stdout] 3233 ~ && let Some(&idx) = col_map.get(ident.value.as_str()) { [INFO] [stdout] 3234 | if let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] ... [INFO] [stdout] 3243 | } [INFO] [stdout] 3244 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:3233:21 [INFO] [stdout] | [INFO] [stdout] 3233 | / if let Some(&idx) = col_map.get(ident.value.as_str()) { [INFO] [stdout] 3234 | | if let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] 3235 | | let ord = if order_expr.asc.unwrap_or(true) { [INFO] [stdout] 3236 | | ord [INFO] [stdout] ... | [INFO] [stdout] 3244 | | } [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] 3233 ~ if let Some(&idx) = col_map.get(ident.value.as_str()) [INFO] [stdout] 3234 ~ && let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] 3235 | let ord = if order_expr.asc.unwrap_or(true) { [INFO] [stdout] ... [INFO] [stdout] 3242 | } [INFO] [stdout] 3243 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/sql/executor.rs:7552:21 [INFO] [stdout] | [INFO] [stdout] 7552 | / if Self::contains_aggregate_function(expr) { [INFO] [stdout] 7553 | | return true; [INFO] [stdout] 7554 | | } [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] 7551 ~ SelectItem::UnnamedExpr(expr) | SelectItem::ExprWithAlias { expr, .. } [INFO] [stdout] 7552 ~ if Self::contains_aggregate_function(expr) => { [INFO] [stdout] 7553 | return true; [INFO] [stdout] 7554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:7586:17 [INFO] [stdout] | [INFO] [stdout] 7586 | / if let Some(operand_expr) = operand { [INFO] [stdout] 7587 | | if Self::contains_aggregate_function(operand_expr) { [INFO] [stdout] 7588 | | return true; [INFO] [stdout] 7589 | | } [INFO] [stdout] 7590 | | } [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] 7586 ~ if let Some(operand_expr) = operand [INFO] [stdout] 7587 ~ && Self::contains_aggregate_function(operand_expr) { [INFO] [stdout] 7588 | return true; [INFO] [stdout] 7589 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:7601:17 [INFO] [stdout] | [INFO] [stdout] 7601 | / if let Some(else_expr) = else_result { [INFO] [stdout] 7602 | | if Self::contains_aggregate_function(else_expr) { [INFO] [stdout] 7603 | | return true; [INFO] [stdout] 7604 | | } [INFO] [stdout] 7605 | | } [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] 7601 ~ if let Some(else_expr) = else_result [INFO] [stdout] 7602 ~ && Self::contains_aggregate_function(else_expr) { [INFO] [stdout] 7603 | return true; [INFO] [stdout] 7604 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8370:25 [INFO] [stdout] | [INFO] [stdout] 8370 | / if let FunctionArguments::List(args) = &func.args { [INFO] [stdout] 8371 | | if args.args.len() == 1 { [INFO] [stdout] 8372 | | if let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] 8373 | | Expr::Identifier(ident), [INFO] [stdout] ... | [INFO] [stdout] 8390 | | } [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] 8370 ~ if let FunctionArguments::List(args) = &func.args [INFO] [stdout] 8371 ~ && args.args.len() == 1 { [INFO] [stdout] 8372 | if let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] ... [INFO] [stdout] 8388 | } [INFO] [stdout] 8389 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8371:29 [INFO] [stdout] | [INFO] [stdout] 8371 | / ... if args.args.len() == 1 { [INFO] [stdout] 8372 | | ... if let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] 8373 | | ... Expr::Identifier(ident), [INFO] [stdout] 8374 | | ... )) = &args.args[0] [INFO] [stdout] ... | [INFO] [stdout] 8389 | | ... } [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] 8371 ~ if args.args.len() == 1 [INFO] [stdout] 8372 ~ && let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] 8373 | Expr::Identifier(ident), [INFO] [stdout] ... [INFO] [stdout] 8387 | } [INFO] [stdout] 8388 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8622:57 [INFO] [stdout] | [INFO] [stdout] 8622 | / ... if let Some(ord) = [INFO] [stdout] 8623 | | ... value.compare(current_min) [INFO] [stdout] 8624 | | ... { [INFO] [stdout] 8625 | | ... if ord.is_lt() { [INFO] [stdout] ... | [INFO] [stdout] 8628 | | ... } [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] 8623 ~ value.compare(current_min) [INFO] [stdout] 8624 ~ && ord.is_lt() { [INFO] [stdout] 8625 | min_value = Some(value); [INFO] [stdout] 8626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8666:57 [INFO] [stdout] | [INFO] [stdout] 8666 | / ... if let Some(ord) = [INFO] [stdout] 8667 | | ... value.compare(current_max) [INFO] [stdout] 8668 | | ... { [INFO] [stdout] 8669 | | ... if ord.is_gt() { [INFO] [stdout] ... | [INFO] [stdout] 8672 | | ... } [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] 8667 ~ value.compare(current_max) [INFO] [stdout] 8668 ~ && ord.is_gt() { [INFO] [stdout] 8669 | max_value = Some(value); [INFO] [stdout] 8670 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:9320:21 [INFO] [stdout] | [INFO] [stdout] 9320 | / if let Value::Text(s) = &low_value { [INFO] [stdout] 9321 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9322 | | low_value = Value::Date(date); [INFO] [stdout] 9323 | | } [INFO] [stdout] 9324 | | } [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] 9320 ~ if let Value::Text(s) = &low_value [INFO] [stdout] 9321 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9322 | low_value = Value::Date(date); [INFO] [stdout] 9323 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:9325:21 [INFO] [stdout] | [INFO] [stdout] 9325 | / if let Value::Text(s) = &high_value { [INFO] [stdout] 9326 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9327 | | high_value = Value::Date(date); [INFO] [stdout] 9328 | | } [INFO] [stdout] 9329 | | } [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] 9325 ~ if let Value::Text(s) = &high_value [INFO] [stdout] 9326 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9327 | high_value = Value::Date(date); [INFO] [stdout] 9328 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:10070:21 [INFO] [stdout] | [INFO] [stdout] 10070 | / if table_name == table_ref { [INFO] [stdout] 10071 | | if let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10072 | | let position = table_offsets[table_idx] + col_idx; [INFO] [stdout] 10073 | | return Ok(row.get(position).cloned().unwrap_or(Value::Null)); [INFO] [stdout] 10074 | | } [INFO] [stdout] 10075 | | } [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] 10070 ~ if table_name == table_ref [INFO] [stdout] 10071 ~ && let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10072 | let position = table_offsets[table_idx] + col_idx; [INFO] [stdout] 10073 | return Ok(row.get(position).cloned().unwrap_or(Value::Null)); [INFO] [stdout] 10074 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:10618:33 [INFO] [stdout] | [INFO] [stdout] 10618 | / ... if table_identifier == table_ref { [INFO] [stdout] 10619 | | ... if let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10620 | | ... columns.push(JoinedColumn::TableColumn( [INFO] [stdout] 10621 | | ... alias.value.clone(), [INFO] [stdout] ... | [INFO] [stdout] 10627 | | ... } [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] 10618 ~ if table_identifier == table_ref [INFO] [stdout] 10619 ~ && let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10620 | columns.push(JoinedColumn::TableColumn( [INFO] [stdout] ... [INFO] [stdout] 10625 | break; [INFO] [stdout] 10626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | / if let Some(open_paren) = ref_str.find('(') { [INFO] [stdout] 96 | | if let Some(close_paren) = ref_str.find(')') { [INFO] [stdout] 97 | | let table = ref_str[..open_paren].to_string(); [INFO] [stdout] 98 | | let col = ref_str[open_paren + 1..close_paren].to_string(); [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] 95 ~ if let Some(open_paren) = ref_str.find('(') [INFO] [stdout] 96 ~ && let Some(close_paren) = ref_str.find(')') { [INFO] [stdout] 97 | let table = ref_str[..open_paren].to_string(); [INFO] [stdout] ... [INFO] [stdout] 100 | column.references = Some(ForeignKeyRef { table, column: col }); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:179:5 [INFO] [stdout] | [INFO] [stdout] 179 | / if let Some(start) = type_str.find('(') { [INFO] [stdout] 180 | | if let Some(end) = type_str.find(')') { [INFO] [stdout] 181 | | return type_str[start + 1..end].parse().ok(); [INFO] [stdout] 182 | | } [INFO] [stdout] 183 | | } [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] 179 ~ if let Some(start) = type_str.find('(') [INFO] [stdout] 180 ~ && let Some(end) = type_str.find(')') { [INFO] [stdout] 181 | return type_str[start + 1..end].parse().ok(); [INFO] [stdout] 182 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | / if let Some(start) = type_str.find('(') { [INFO] [stdout] 189 | | if let Some(end) = type_str.find(')') { [INFO] [stdout] 190 | | let params = &type_str[start + 1..end]; [INFO] [stdout] 191 | | let parts: Vec<&str> = params.split(',').collect(); [INFO] [stdout] ... | [INFO] [stdout] 202 | | } [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] 188 ~ if let Some(start) = type_str.find('(') [INFO] [stdout] 189 ~ && let Some(end) = type_str.find(')') { [INFO] [stdout] 190 | let params = &type_str[start + 1..end]; [INFO] [stdout] ... [INFO] [stdout] 200 | } [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:196:20 [INFO] [stdout] | [INFO] [stdout] 196 | } else if parts.len() == 1 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 197 | | if let Ok(p) = parts[0].trim().parse() { [INFO] [stdout] 198 | | return Some((p, 0)); [INFO] [stdout] 199 | | } [INFO] [stdout] 200 | | } [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] 196 ~ } else if parts.len() == 1 [INFO] [stdout] 197 ~ && let Ok(p) = parts[0].trim().parse() { [INFO] [stdout] 198 | return Some((p, 0)); [INFO] [stdout] 199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/error_context.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | / if let Some(start) = error_lower.find(pattern) { [INFO] [stdout] 52 | | if let Some(name_start) = error[start..].find('\'') { [INFO] [stdout] 53 | | if let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] 54 | | let name = [INFO] [stdout] ... | [INFO] [stdout] 64 | | } [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] 51 ~ if let Some(start) = error_lower.find(pattern) [INFO] [stdout] 52 ~ && let Some(name_start) = error[start..].find('\'') { [INFO] [stdout] 53 | if let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] ... [INFO] [stdout] 62 | } [INFO] [stdout] 63 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/error_context.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | / if let Some(name_start) = error[start..].find('\'') { [INFO] [stdout] 53 | | if let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] 54 | | let name = [INFO] [stdout] 55 | | &error[start + name_start + 1..start + name_start + 1 + name_end]; [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [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] 52 ~ if let Some(name_start) = error[start..].find('\'') [INFO] [stdout] 53 ~ && let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] 54 | let name = [INFO] [stdout] ... [INFO] [stdout] 61 | } [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `matrix` [INFO] [stdout] --> src/error_context.rs:251:14 [INFO] [stdout] | [INFO] [stdout] 251 | for j in 0..=len2 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 251 - for j in 0..=len2 { [INFO] [stdout] 251 + for (j, ) in matrix.iter_mut().enumerate().take(len2 + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/query_logger.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | / if let Some(ref file_path) = self.config.file_path { [INFO] [stdout] 173 | | if let Err(e) = self.write_to_file(&entry, file_path).await { [INFO] [stdout] 174 | | error!("Failed to write query log to file: {}", e); [INFO] [stdout] 175 | | } [INFO] [stdout] 176 | | } [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] 172 ~ if let Some(ref file_path) = self.config.file_path [INFO] [stdout] 173 ~ && let Err(e) = self.write_to_file(&entry, file_path).await { [INFO] [stdout] 174 | error!("Failed to write query log to file: {}", e); [INFO] [stdout] 175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/database/storage.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / if let Some(table_index) = self.primary_key_index.get(table_name) { [INFO] [stdout] 69 | | if let Some(row_idx) = table_index.get(pk_value) { [INFO] [stdout] 70 | | let db = self.database.read().await; [INFO] [stdout] 71 | | if let Some(table) = db.get_table(table_name) { [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [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] 68 ~ if let Some(table_index) = self.primary_key_index.get(table_name) [INFO] [stdout] 69 ~ && let Some(row_idx) = table_index.get(pk_value) { [INFO] [stdout] 70 | let db = self.database.read().await; [INFO] [stdout] ... [INFO] [stdout] 73 | } [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Statement::Query(query) = statement { [INFO] [stdout] 92 | | if let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 93 | | let order_by_exprs = query.order_by.iter() [INFO] [stdout] 94 | | .flat_map(|ob| ob.exprs.iter()) [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [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] 91 ~ if let Statement::Query(query) = statement [INFO] [stdout] 92 ~ && let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 93 | let order_by_exprs = query.order_by.iter() [INFO] [stdout] ... [INFO] [stdout] 97 | return self.handle_select(select, query.limit.as_ref(), &order_by_exprs); [INFO] [stdout] 98 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:452:9 [INFO] [stdout] | [INFO] [stdout] 452 | / if projection.len() == 1 { [INFO] [stdout] 453 | | if let SelectItem::Wildcard(_) = &projection[0] { [INFO] [stdout] 454 | | return Ok(result); [INFO] [stdout] 455 | | } [INFO] [stdout] 456 | | } [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] 452 ~ if projection.len() == 1 [INFO] [stdout] 453 ~ && let SelectItem::Wildcard(_) = &projection[0] { [INFO] [stdout] 454 | return Ok(result); [INFO] [stdout] 455 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:530:9 [INFO] [stdout] | [INFO] [stdout] 530 | / if let Expr::Value(sqlparser::ast::Value::Number(n, _)) = limit_expr { [INFO] [stdout] 531 | | if let Ok(limit) = n.parse::() { [INFO] [stdout] 532 | | result.rows.truncate(limit); [INFO] [stdout] 533 | | } [INFO] [stdout] 534 | | } [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] 530 ~ if let Expr::Value(sqlparser::ast::Value::Number(n, _)) = limit_expr [INFO] [stdout] 531 ~ && let Ok(limit) = n.parse::() { [INFO] [stdout] 532 | result.rows.truncate(limit); [INFO] [stdout] 533 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:615:13 [INFO] [stdout] | [INFO] [stdout] 615 | / if let Some(Value::Text(relkind)) = row.get(15) { [INFO] [stdout] 616 | | if relkind == "r" { [INFO] [stdout] 617 | | // Check relnamespace (column 2) [INFO] [stdout] 618 | | if let Some(Value::Integer(ns_oid)) = row.get(2) { [INFO] [stdout] ... | [INFO] [stdout] 627 | | } [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] 615 ~ if let Some(Value::Text(relkind)) = row.get(15) [INFO] [stdout] 616 ~ && relkind == "r" { [INFO] [stdout] 617 | // Check relnamespace (column 2) [INFO] [stdout] ... [INFO] [stdout] 625 | } [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:618:21 [INFO] [stdout] | [INFO] [stdout] 618 | / if let Some(Value::Integer(ns_oid)) = row.get(2) { [INFO] [stdout] 619 | | if *ns_oid == 2200 { // public namespace [INFO] [stdout] 620 | | // Get relname (column 1) [INFO] [stdout] 621 | | if let Some(Value::Text(relname)) = row.get(1) { [INFO] [stdout] ... | [INFO] [stdout] 625 | | } [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] 618 ~ if let Some(Value::Integer(ns_oid)) = row.get(2) [INFO] [stdout] 619 ~ && *ns_oid == 2200 { // public namespace [INFO] [stdout] 620 | // Get relname (column 1) [INFO] [stdout] ... [INFO] [stdout] 623 | } [INFO] [stdout] 624 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:706:13 [INFO] [stdout] | [INFO] [stdout] 706 | / if let (Some(Value::Text(name)), Some(Value::Integer(oid))) = (row.get(1), row.get(0)) { [INFO] [stdout] 707 | | if name == &table_name { [INFO] [stdout] 708 | | table_oid = *oid; [INFO] [stdout] 709 | | break; [INFO] [stdout] 710 | | } [INFO] [stdout] 711 | | } [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] 706 ~ if let (Some(Value::Text(name)), Some(Value::Integer(oid))) = (row.get(1), row.get(0)) [INFO] [stdout] 707 ~ && name == &table_name { [INFO] [stdout] 708 | table_oid = *oid; [INFO] [stdout] 709 | break; [INFO] [stdout] 710 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:706:88 [INFO] [stdout] | [INFO] [stdout] 706 | if let (Some(Value::Text(name)), Some(Value::Integer(oid))) = (row.get(1), row.get(0)) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:718:13 [INFO] [stdout] | [INFO] [stdout] 718 | / if let Some(Value::Integer(attrelid)) = row.get(0) { [INFO] [stdout] 719 | | if *attrelid == table_oid { [INFO] [stdout] 720 | | // Extract column info [INFO] [stdout] 721 | | let name = row.get(1).map(|v| v.to_string()).unwrap_or_default(); [INFO] [stdout] ... | [INFO] [stdout] 759 | | } [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] 718 ~ if let Some(Value::Integer(attrelid)) = row.get(0) [INFO] [stdout] 719 ~ && *attrelid == table_oid { [INFO] [stdout] 720 | // Extract column info [INFO] [stdout] ... [INFO] [stdout] 757 | ]); [INFO] [stdout] 758 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:718:53 [INFO] [stdout] | [INFO] [stdout] 718 | if let Some(Value::Integer(attrelid)) = row.get(0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:727:21 [INFO] [stdout] | [INFO] [stdout] 727 | / if let Ok(num) = attnum.parse::() { [INFO] [stdout] 728 | | if num <= 0 { [INFO] [stdout] 729 | | continue; [INFO] [stdout] 730 | | } [INFO] [stdout] 731 | | } [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] 727 ~ if let Ok(num) = attnum.parse::() [INFO] [stdout] 728 ~ && num <= 0 { [INFO] [stdout] 729 | continue; [INFO] [stdout] 730 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attr_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:835:22 [INFO] [stdout] | [INFO] [stdout] 835 | (attr_row.get(0), attr_row.get(5)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `attr_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:845:25 [INFO] [stdout] | [INFO] [stdout] 845 | / if let (Some(Value::Integer(oid)), Some(Value::Text(relname))) = [INFO] [stdout] 846 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 847 | | [INFO] [stdout] 848 | | if *oid == *attrelid { [INFO] [stdout] ... | [INFO] [stdout] 922 | | } [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] 846 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 847 | [INFO] [stdout] 848 ~ && *oid == *attrelid { [INFO] [stdout] 849 | // Check WHERE conditions if any [INFO] [stdout] ... [INFO] [stdout] 920 | break; // Found the matching class row [INFO] [stdout] 921 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:846:30 [INFO] [stdout] | [INFO] [stdout] 846 | ... (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:872:33 [INFO] [stdout] | [INFO] [stdout] 872 | / ... if query_lower.contains("where") && query_lower.contains("attrelid") { [INFO] [stdout] 873 | | ... if let Some(idx) = query_lower.find("attrelid = ") { [INFO] [stdout] 874 | | ... let after = &query[idx + 11..]; [INFO] [stdout] 875 | | ... let num_str: String = after.chars() [INFO] [stdout] ... | [INFO] [stdout] 884 | | ... } [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] 872 ~ if query_lower.contains("where") && query_lower.contains("attrelid") [INFO] [stdout] 873 ~ && let Some(idx) = query_lower.find("attrelid = ") { [INFO] [stdout] 874 | let after = &query[idx + 11..]; [INFO] [stdout] ... [INFO] [stdout] 882 | } [INFO] [stdout] 883 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:878:41 [INFO] [stdout] | [INFO] [stdout] 878 | / ... if let Ok(target_oid) = num_str.parse::() { [INFO] [stdout] 879 | | ... if *attrelid != target_oid { [INFO] [stdout] 880 | | ... include = false; [INFO] [stdout] 881 | | ... } [INFO] [stdout] 882 | | ... } [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] 878 ~ if let Ok(target_oid) = num_str.parse::() [INFO] [stdout] 879 ~ && *attrelid != target_oid { [INFO] [stdout] 880 | include = false; [INFO] [stdout] 881 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1007:17 [INFO] [stdout] | [INFO] [stdout] 1007 | / if let (Some(Value::Integer(oid)), Some(Value::Text(relname))) = [INFO] [stdout] 1008 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 1009 | | if relname == &table { [INFO] [stdout] 1010 | | table_oid = Some(*oid); [INFO] [stdout] ... | [INFO] [stdout] 1013 | | } [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] 1008 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 1009 ~ && relname == &table { [INFO] [stdout] 1010 | table_oid = Some(*oid); [INFO] [stdout] 1011 | break; [INFO] [stdout] 1012 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1008:22 [INFO] [stdout] | [INFO] [stdout] 1008 | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attr_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1024:26 [INFO] [stdout] | [INFO] [stdout] 1024 | (attr_row.get(0), attr_row.get(1), attr_row.get(2), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `attr_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1130:17 [INFO] [stdout] | [INFO] [stdout] 1130 | / if let (Some(Value::Integer(row_oid)), Some(Value::Text(relname))) = [INFO] [stdout] 1131 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 1132 | | if relname == table { [INFO] [stdout] 1133 | | oid = Some(*row_oid); [INFO] [stdout] ... | [INFO] [stdout] 1136 | | } [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] 1131 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 1132 ~ && relname == table { [INFO] [stdout] 1133 | oid = Some(*row_oid); [INFO] [stdout] 1134 | break; [INFO] [stdout] 1135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1131:22 [INFO] [stdout] | [INFO] [stdout] 1131 | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `constraint_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1150:18 [INFO] [stdout] | [INFO] [stdout] 1150 | (constraint_row.get(0), constraint_row.get(1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `constraint_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1159:17 [INFO] [stdout] | [INFO] [stdout] 1159 | / if let Some(target_oid) = table_oid { [INFO] [stdout] 1160 | | if *conrelid != target_oid { [INFO] [stdout] 1161 | | continue; [INFO] [stdout] 1162 | | } [INFO] [stdout] 1163 | | } [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] 1159 ~ if let Some(target_oid) = table_oid [INFO] [stdout] 1160 ~ && *conrelid != target_oid { [INFO] [stdout] 1161 | continue; [INFO] [stdout] 1162 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1170:21 [INFO] [stdout] | [INFO] [stdout] 1170 | / if let (Some(Value::Integer(class_oid)), Some(Value::Text(relname))) = [INFO] [stdout] 1171 | | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] 1172 | | if *class_oid == *confrelid { [INFO] [stdout] 1173 | | ref_table_name = relname.clone(); [INFO] [stdout] ... | [INFO] [stdout] 1176 | | } [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] 1171 ~ (class_row.get(0), class_row.get(1)) [INFO] [stdout] 1172 ~ && *class_oid == *confrelid { [INFO] [stdout] 1173 | ref_table_name = relname.clone(); [INFO] [stdout] 1174 | break; [INFO] [stdout] 1175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1171:26 [INFO] [stdout] | [INFO] [stdout] 1171 | (class_row.get(0), class_row.get(1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `class_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1216:18 [INFO] [stdout] | [INFO] [stdout] 1216 | (class_row.get(0), class_row.get(1), class_row.get(15)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `class_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attr_row.get(0)` [INFO] [stdout] --> src/protocol/catalog_router.rs:1233:26 [INFO] [stdout] | [INFO] [stdout] 1233 | (attr_row.get(0), attr_row.get(1), attr_row.get(2), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `attr_row.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1299:9 [INFO] [stdout] | [INFO] [stdout] 1299 | / if let Statement::Query(query) = statement { [INFO] [stdout] 1300 | | if let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 1301 | | // Check if this is a catalog table query [INFO] [stdout] 1302 | | if let Some(table_ref) = select.from.first() { [INFO] [stdout] ... | [INFO] [stdout] 1370 | | } [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] 1299 ~ if let Statement::Query(query) = statement [INFO] [stdout] 1300 ~ && let SetExpr::Select(select) = &*query.body { [INFO] [stdout] 1301 | // Check if this is a catalog table query [INFO] [stdout] ... [INFO] [stdout] 1368 | } [INFO] [stdout] 1369 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1302:17 [INFO] [stdout] | [INFO] [stdout] 1302 | / if let Some(table_ref) = select.from.first() { [INFO] [stdout] 1303 | | if let TableFactor::Table { name, .. } = &table_ref.relation { [INFO] [stdout] 1304 | | let table_name = name.0.iter() [INFO] [stdout] 1305 | | .map(|ident| ident.value.as_str()) [INFO] [stdout] ... | [INFO] [stdout] 1368 | | } [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] 1302 ~ if let Some(table_ref) = select.from.first() [INFO] [stdout] 1303 ~ && let TableFactor::Table { name, .. } = &table_ref.relation { [INFO] [stdout] 1304 | let table_name = name.0.iter() [INFO] [stdout] ... [INFO] [stdout] 1366 | } [INFO] [stdout] 1367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/catalog_router.rs:1312:25 [INFO] [stdout] | [INFO] [stdout] 1312 | / if select.from.len() > 1 || select.from.iter().any(|t| { [INFO] [stdout] 1313 | | if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] 1314 | | true [INFO] [stdout] 1315 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 1324 | | } [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] 1312 ~ if (select.from.len() > 1 || select.from.iter().any(|t| { [INFO] [stdout] 1313 | if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] ... [INFO] [stdout] 1317 | } [INFO] [stdout] 1318 ~ })) { [INFO] [stdout] 1319 ~ && (table_name.contains("pg_attribute") || table_name.contains("pg_class")) { [INFO] [stdout] 1320 | debug!("Detected catalog JOIN in parsed statement"); [INFO] [stdout] 1321 | // For now, return all table columns for SQLAlchemy compatibility [INFO] [stdout] 1322 | return Ok(Some(self.get_all_table_columns()?)); [INFO] [stdout] 1323 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/protocol/catalog_router.rs:1313:29 [INFO] [stdout] | [INFO] [stdout] 1313 | / ... if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] 1314 | | ... true [INFO] [stdout] 1315 | | ... } else { [INFO] [stdout] 1316 | | ... false [INFO] [stdout] 1317 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 1313 - if let TableFactor::Table { .. } = &t.relation { [INFO] [stdout] 1314 - true [INFO] [stdout] 1315 - } else { [INFO] [stdout] 1316 - false [INFO] [stdout] 1317 - } [INFO] [stdout] 1313 + matches!(&t.relation, TableFactor::Table { .. }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/protocol/catalog_router.rs:1384:61 [INFO] [stdout] | [INFO] [stdout] 1384 | if self.evaluate_where_for_pg_class(where_expr, &row) { [INFO] [stdout] | ^^^^ help: change this to: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/protocol/catalog_router.rs:1395:9 [INFO] [stdout] | [INFO] [stdout] 1395 | / match expr { [INFO] [stdout] 1396 | | Expr::BinaryOp { left, op, right } => { [INFO] [stdout] 1397 | | match op { [INFO] [stdout] 1398 | | BinaryOperator::Eq => { [INFO] [stdout] ... | [INFO] [stdout] 1429 | | _ => {} [INFO] [stdout] 1430 | | } [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] 1395 ~ if let Expr::BinaryOp { left, op, right } = expr { [INFO] [stdout] 1396 + match op { [INFO] [stdout] 1397 + BinaryOperator::Eq => { [INFO] [stdout] 1398 + // Check if it's relname = 'something' or relkind = 'something' [INFO] [stdout] 1399 + if let (Expr::Identifier(ident), Expr::Value(sqlparser::ast::Value::SingleQuotedString(value))) = [INFO] [stdout] 1400 + (left.as_ref(), right.as_ref()) { [INFO] [stdout] 1401 + [INFO] [stdout] 1402 + let col_name = ident.value.to_lowercase(); [INFO] [stdout] 1403 + match col_name.as_str() { [INFO] [stdout] 1404 + "relname" => { [INFO] [stdout] 1405 + // relname is column 1 [INFO] [stdout] 1406 + if let Some(Value::Text(relname)) = row.get(1) { [INFO] [stdout] 1407 + return relname == value; [INFO] [stdout] 1408 + } [INFO] [stdout] 1409 + } [INFO] [stdout] 1410 + "relkind" => { [INFO] [stdout] 1411 + // relkind is column 2 [INFO] [stdout] 1412 + if let Some(Value::Text(relkind)) = row.get(2) { [INFO] [stdout] 1413 + return relkind == value; [INFO] [stdout] 1414 + } [INFO] [stdout] 1415 + } [INFO] [stdout] 1416 + _ => {} [INFO] [stdout] 1417 + } [INFO] [stdout] 1418 + } [INFO] [stdout] 1419 + } [INFO] [stdout] 1420 + BinaryOperator::And => { [INFO] [stdout] 1421 + // Evaluate both sides [INFO] [stdout] 1422 + return self.evaluate_where_for_pg_class(left, row) && [INFO] [stdout] 1423 + self.evaluate_where_for_pg_class(right, row); [INFO] [stdout] 1424 + } [INFO] [stdout] 1425 + _ => {} [INFO] [stdout] 1426 + } [INFO] [stdout] 1427 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/mysql.rs:496:9 [INFO] [stdout] | [INFO] [stdout] 496 | / if let Ok(handled) = self.system_variables.handle_set_command(query_trimmed) { [INFO] [stdout] 497 | | if handled { [INFO] [stdout] 498 | | return self.send_ok(stream, state, 0, 0).await; [INFO] [stdout] 499 | | } [INFO] [stdout] 500 | | } [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] 496 ~ if let Ok(handled) = self.system_variables.handle_set_command(query_trimmed) [INFO] [stdout] 497 ~ && handled { [INFO] [stdout] 498 | return self.send_ok(stream, state, 0, 0).await; [INFO] [stdout] 499 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/mysql_functions.rs:817:9 [INFO] [stdout] | [INFO] [stdout] 817 | / if let Ok(parts) = parts { [INFO] [stdout] 818 | | if parts.len() == 4 && parts.iter().all(|&p| p <= 255) { [INFO] [stdout] 819 | | let result = (parts[0] << 24) + (parts[1] << 16) + (parts[2] << 8) + parts[3]; [INFO] [stdout] 820 | | return Ok(Value::Integer(result as i64)); [INFO] [stdout] 821 | | } [INFO] [stdout] 822 | | } [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] 817 ~ if let Ok(parts) = parts [INFO] [stdout] 818 ~ && parts.len() == 4 && parts.iter().all(|&p| p <= 255) { [INFO] [stdout] 819 | let result = (parts[0] << 24) + (parts[1] << 16) + (parts[2] << 8) + parts[3]; [INFO] [stdout] 820 | return Ok(Value::Integer(result as i64)); [INFO] [stdout] 821 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `table_oid` is used as a loop counter [INFO] [stdout] --> src/protocol/postgres.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | for (table_name, table) in &db.tables { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (table_oid, (table_name, table)) in (16384..).zip((&db.tables).into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_catalog.rs:685:13 [INFO] [stdout] | [INFO] [stdout] 685 | / if let Some(where_clause) = where_clause { [INFO] [stdout] 686 | | if where_clause.contains("relkind = 'r'") && pg_class.relkind != 'r' { [INFO] [stdout] 687 | | continue; [INFO] [stdout] 688 | | } [INFO] [stdout] 689 | | } [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] 685 ~ if let Some(where_clause) = where_clause [INFO] [stdout] 686 ~ && where_clause.contains("relkind = 'r'") && pg_class.relkind != 'r' { [INFO] [stdout] 687 | continue; [INFO] [stdout] 688 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | / if parameter_types.is_empty() && !parsed_statements.is_empty() { [INFO] [stdout] 121 | | if let Statement::Query(query_ref) = &parsed_statements[0] { [INFO] [stdout] 122 | | let inferred_types = infer_parameter_types(query_ref); [INFO] [stdout] 123 | | debug!("Inferred {} parameters from query", inferred_types.len()); [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [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] 120 ~ if parameter_types.is_empty() && !parsed_statements.is_empty() [INFO] [stdout] 121 ~ && let Statement::Query(query_ref) = &parsed_statements[0] { [INFO] [stdout] 122 | let inferred_types = infer_parameter_types(query_ref); [INFO] [stdout] 123 | debug!("Inferred {} parameters from query", inferred_types.len()); [INFO] [stdout] 124 | parameter_types = inferred_types; [INFO] [stdout] 125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:666:17 [INFO] [stdout] | [INFO] [stdout] 666 | / if let Some(table) = select.from.first() { [INFO] [stdout] 667 | | if let Some(table_name) = get_table_name_from_relation(&table.relation) { [INFO] [stdout] 668 | | if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] ... | [INFO] [stdout] 677 | | } [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] 666 ~ if let Some(table) = select.from.first() [INFO] [stdout] 667 ~ && let Some(table_name) = get_table_name_from_relation(&table.relation) { [INFO] [stdout] 668 | if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] ... [INFO] [stdout] 675 | } [INFO] [stdout] 676 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:667:21 [INFO] [stdout] | [INFO] [stdout] 667 | / if let Some(table_name) = get_table_name_from_relation(&table.relation) { [INFO] [stdout] 668 | | if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] 670 | | for col in &table.columns { [INFO] [stdout] ... | [INFO] [stdout] 676 | | } [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] 667 ~ if let Some(table_name) = get_table_name_from_relation(&table.relation) [INFO] [stdout] 668 ~ && let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] ... [INFO] [stdout] 674 | } [INFO] [stdout] 675 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:668:25 [INFO] [stdout] | [INFO] [stdout] 668 | / if let Ok(db) = executor.storage().database().try_read() { [INFO] [stdout] 669 | | if let Some(table) = db.get_table(&table_name) { [INFO] [stdout] 670 | | for col in &table.columns { [INFO] [stdout] 671 | | columns.push(col.name.clone()); [INFO] [stdout] ... | [INFO] [stdout] 675 | | } [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] 668 ~ if let Ok(db) = executor.storage().database().try_read() [INFO] [stdout] 669 ~ && let Some(table) = db.get_table(&table_name) { [INFO] [stdout] 670 | for col in &table.columns { [INFO] [stdout] ... [INFO] [stdout] 673 | } [INFO] [stdout] 674 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:897:5 [INFO] [stdout] | [INFO] [stdout] 897 | / if let sqlparser::ast::SetExpr::Select(select) = &mut *query.body { [INFO] [stdout] 898 | | if let Some(selection) = &mut select.selection { [INFO] [stdout] 899 | | substitute_parameters_in_expr(selection, parameters)?; [INFO] [stdout] 900 | | } [INFO] [stdout] 901 | | } [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] 897 ~ if let sqlparser::ast::SetExpr::Select(select) = &mut *query.body [INFO] [stdout] 898 ~ && let Some(selection) = &mut select.selection { [INFO] [stdout] 899 | substitute_parameters_in_expr(selection, parameters)?; [INFO] [stdout] 900 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1042:21 [INFO] [stdout] | [INFO] [stdout] 1042 | / if let Expr::Value(SqlValue::Placeholder(s)) = &**left { [INFO] [stdout] 1043 | | if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1044 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | | if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] ... | [INFO] [stdout] 1050 | | } [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] 1042 ~ if let Expr::Value(SqlValue::Placeholder(s)) = &**left [INFO] [stdout] 1043 ~ && let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1044 | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] ... [INFO] [stdout] 1048 | } [INFO] [stdout] 1049 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1043:25 [INFO] [stdout] | [INFO] [stdout] 1043 | / if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1044 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | | if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] ... | [INFO] [stdout] 1049 | | } [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] 1043 ~ if let Some(num_str) = s.strip_prefix('$') [INFO] [stdout] 1044 ~ && let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1047 | } [INFO] [stdout] 1048 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1044:29 [INFO] [stdout] | [INFO] [stdout] 1044 | / ... if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1045 | | ... if let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | | ... parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1047 | | ... } [INFO] [stdout] 1048 | | ... } [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] 1044 ~ if let Ok(param_num) = num_str.parse::() [INFO] [stdout] 1045 ~ && let Some(inferred_type) = infer_type_from_expr(right) { [INFO] [stdout] 1046 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1047 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1051:21 [INFO] [stdout] | [INFO] [stdout] 1051 | / if let Expr::Value(SqlValue::Placeholder(s)) = &**right { [INFO] [stdout] 1052 | | if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1053 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | | if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] ... | [INFO] [stdout] 1059 | | } [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] 1051 ~ if let Expr::Value(SqlValue::Placeholder(s)) = &**right [INFO] [stdout] 1052 ~ && let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1053 | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] ... [INFO] [stdout] 1057 | } [INFO] [stdout] 1058 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1052:25 [INFO] [stdout] | [INFO] [stdout] 1052 | / if let Some(num_str) = s.strip_prefix('$') { [INFO] [stdout] 1053 | | if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | | if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] ... | [INFO] [stdout] 1058 | | } [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] 1052 ~ if let Some(num_str) = s.strip_prefix('$') [INFO] [stdout] 1053 ~ && let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1056 | } [INFO] [stdout] 1057 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/protocol/postgres_extended.rs:1053:29 [INFO] [stdout] | [INFO] [stdout] 1053 | / ... if let Ok(param_num) = num_str.parse::() { [INFO] [stdout] 1054 | | ... if let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | | ... parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1056 | | ... } [INFO] [stdout] 1057 | | ... } [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] 1053 ~ if let Ok(param_num) = num_str.parse::() [INFO] [stdout] 1054 ~ && let Some(inferred_type) = infer_type_from_expr(left) { [INFO] [stdout] 1055 | parameter_types.insert(param_num, inferred_type); [INFO] [stdout] 1056 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `table_oid` is used as a loop counter [INFO] [stdout] --> src/protocol/shared_catalog.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for (table_name, table) in &db.tables { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (table_oid, (table_name, table)) in (16384..).zip((&db.tables).into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1330:9 [INFO] [stdout] | [INFO] [stdout] 1330 | / if let Expr::BinaryOp { left, op, right } = where_expr { [INFO] [stdout] 1331 | | if matches!(op, BinaryOperator::Eq) { [INFO] [stdout] 1332 | | // Check if left side is the primary key column [INFO] [stdout] 1333 | | if let Expr::Identifier(ident) = left.as_ref() { [INFO] [stdout] ... | [INFO] [stdout] 1350 | | } [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] 1330 ~ if let Expr::BinaryOp { left, op, right } = where_expr [INFO] [stdout] 1331 ~ && matches!(op, BinaryOperator::Eq) { [INFO] [stdout] 1332 | // Check if left side is the primary key column [INFO] [stdout] ... [INFO] [stdout] 1348 | } [INFO] [stdout] 1349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1333:17 [INFO] [stdout] | [INFO] [stdout] 1333 | / if let Expr::Identifier(ident) = left.as_ref() { [INFO] [stdout] 1334 | | if ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1335 | | // Extract the value from the right side [INFO] [stdout] 1336 | | if let Expr::Value(sql_value) = right.as_ref() { [INFO] [stdout] ... | [INFO] [stdout] 1340 | | } [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] 1333 ~ if let Expr::Identifier(ident) = left.as_ref() [INFO] [stdout] 1334 ~ && ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1335 | // Extract the value from the right side [INFO] [stdout] ... [INFO] [stdout] 1338 | } [INFO] [stdout] 1339 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1342:17 [INFO] [stdout] | [INFO] [stdout] 1342 | / if let Expr::Identifier(ident) = right.as_ref() { [INFO] [stdout] 1343 | | if ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1344 | | if let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] ... | [INFO] [stdout] 1348 | | } [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] 1342 ~ if let Expr::Identifier(ident) = right.as_ref() [INFO] [stdout] 1343 ~ && ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1344 | if let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] 1346 | } [INFO] [stdout] 1347 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1343:21 [INFO] [stdout] | [INFO] [stdout] 1343 | / if ident.value.to_lowercase() == pk_column.to_lowercase() { [INFO] [stdout] 1344 | | if let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] 1346 | | } [INFO] [stdout] 1347 | | } [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] 1343 ~ if ident.value.to_lowercase() == pk_column.to_lowercase() [INFO] [stdout] 1344 ~ && let Expr::Value(sql_value) = left.as_ref() { [INFO] [stdout] 1345 | return self.sql_value_to_db_value(sql_value).ok(); [INFO] [stdout] 1346 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1546:13 [INFO] [stdout] | [INFO] [stdout] 1546 | / if let Value::Text(s) = &low_value { [INFO] [stdout] 1547 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1548 | | low_value = Value::Date(date); [INFO] [stdout] 1549 | | } [INFO] [stdout] 1550 | | } [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] 1546 ~ if let Value::Text(s) = &low_value [INFO] [stdout] 1547 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1548 | low_value = Value::Date(date); [INFO] [stdout] 1549 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1551:13 [INFO] [stdout] | [INFO] [stdout] 1551 | / if let Value::Text(s) = &high_value { [INFO] [stdout] 1552 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1553 | | high_value = Value::Date(date); [INFO] [stdout] 1554 | | } [INFO] [stdout] 1555 | | } [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] 1551 ~ if let Value::Text(s) = &high_value [INFO] [stdout] 1552 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1553 | high_value = Value::Date(date); [INFO] [stdout] 1554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1593:13 [INFO] [stdout] | [INFO] [stdout] 1593 | / if let Value::Text(s) = &low_value { [INFO] [stdout] 1594 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1595 | | low_value = Value::Date(date); [INFO] [stdout] 1596 | | } [INFO] [stdout] 1597 | | } [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] 1593 ~ if let Value::Text(s) = &low_value [INFO] [stdout] 1594 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1595 | low_value = Value::Date(date); [INFO] [stdout] 1596 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:1598:13 [INFO] [stdout] | [INFO] [stdout] 1598 | / if let Value::Text(s) = &high_value { [INFO] [stdout] 1599 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1600 | | high_value = Value::Date(date); [INFO] [stdout] 1601 | | } [INFO] [stdout] 1602 | | } [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] 1598 ~ if let Value::Text(s) = &high_value [INFO] [stdout] 1599 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 1600 | high_value = Value::Date(date); [INFO] [stdout] 1601 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:3062:13 [INFO] [stdout] | [INFO] [stdout] 3062 | / if let ProjectionItem::Expression(_, expr) = item { [INFO] [stdout] 3063 | | if let Some(window_result) = [INFO] [stdout] 3064 | | self.evaluate_window_function_for_all_rows(expr, rows, table)? [INFO] [stdout] ... | [INFO] [stdout] 3071 | | } [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] 3062 ~ if let ProjectionItem::Expression(_, expr) = item [INFO] [stdout] 3063 ~ && let Some(window_result) = [INFO] [stdout] 3064 | self.evaluate_window_function_for_all_rows(expr, rows, table)? [INFO] [stdout] ... [INFO] [stdout] 3069 | } [INFO] [stdout] 3070 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:3232:17 [INFO] [stdout] | [INFO] [stdout] 3232 | / if let Expr::Identifier(ident) = &order_expr.expr { [INFO] [stdout] 3233 | | if let Some(&idx) = col_map.get(ident.value.as_str()) { [INFO] [stdout] 3234 | | if let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] 3235 | | let ord = if order_expr.asc.unwrap_or(true) { [INFO] [stdout] ... | [INFO] [stdout] 3245 | | } [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] 3232 ~ if let Expr::Identifier(ident) = &order_expr.expr [INFO] [stdout] 3233 ~ && let Some(&idx) = col_map.get(ident.value.as_str()) { [INFO] [stdout] 3234 | if let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] ... [INFO] [stdout] 3243 | } [INFO] [stdout] 3244 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:3233:21 [INFO] [stdout] | [INFO] [stdout] 3233 | / if let Some(&idx) = col_map.get(ident.value.as_str()) { [INFO] [stdout] 3234 | | if let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] 3235 | | let ord = if order_expr.asc.unwrap_or(true) { [INFO] [stdout] 3236 | | ord [INFO] [stdout] ... | [INFO] [stdout] 3244 | | } [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] 3233 ~ if let Some(&idx) = col_map.get(ident.value.as_str()) [INFO] [stdout] 3234 ~ && let Some(ord) = a[idx].compare(&b[idx]) { [INFO] [stdout] 3235 | let ord = if order_expr.asc.unwrap_or(true) { [INFO] [stdout] ... [INFO] [stdout] 3242 | } [INFO] [stdout] 3243 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/sql/executor.rs:7552:21 [INFO] [stdout] | [INFO] [stdout] 7552 | / if Self::contains_aggregate_function(expr) { [INFO] [stdout] 7553 | | return true; [INFO] [stdout] 7554 | | } [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] 7551 ~ SelectItem::UnnamedExpr(expr) | SelectItem::ExprWithAlias { expr, .. } [INFO] [stdout] 7552 ~ if Self::contains_aggregate_function(expr) => { [INFO] [stdout] 7553 | return true; [INFO] [stdout] 7554 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:7586:17 [INFO] [stdout] | [INFO] [stdout] 7586 | / if let Some(operand_expr) = operand { [INFO] [stdout] 7587 | | if Self::contains_aggregate_function(operand_expr) { [INFO] [stdout] 7588 | | return true; [INFO] [stdout] 7589 | | } [INFO] [stdout] 7590 | | } [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] 7586 ~ if let Some(operand_expr) = operand [INFO] [stdout] 7587 ~ && Self::contains_aggregate_function(operand_expr) { [INFO] [stdout] 7588 | return true; [INFO] [stdout] 7589 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:7601:17 [INFO] [stdout] | [INFO] [stdout] 7601 | / if let Some(else_expr) = else_result { [INFO] [stdout] 7602 | | if Self::contains_aggregate_function(else_expr) { [INFO] [stdout] 7603 | | return true; [INFO] [stdout] 7604 | | } [INFO] [stdout] 7605 | | } [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] 7601 ~ if let Some(else_expr) = else_result [INFO] [stdout] 7602 ~ && Self::contains_aggregate_function(else_expr) { [INFO] [stdout] 7603 | return true; [INFO] [stdout] 7604 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8370:25 [INFO] [stdout] | [INFO] [stdout] 8370 | / if let FunctionArguments::List(args) = &func.args { [INFO] [stdout] 8371 | | if args.args.len() == 1 { [INFO] [stdout] 8372 | | if let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] 8373 | | Expr::Identifier(ident), [INFO] [stdout] ... | [INFO] [stdout] 8390 | | } [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] 8370 ~ if let FunctionArguments::List(args) = &func.args [INFO] [stdout] 8371 ~ && args.args.len() == 1 { [INFO] [stdout] 8372 | if let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] ... [INFO] [stdout] 8388 | } [INFO] [stdout] 8389 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8371:29 [INFO] [stdout] | [INFO] [stdout] 8371 | / ... if args.args.len() == 1 { [INFO] [stdout] 8372 | | ... if let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] 8373 | | ... Expr::Identifier(ident), [INFO] [stdout] 8374 | | ... )) = &args.args[0] [INFO] [stdout] ... | [INFO] [stdout] 8389 | | ... } [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] 8371 ~ if args.args.len() == 1 [INFO] [stdout] 8372 ~ && let FunctionArg::Unnamed(FunctionArgExpr::Expr( [INFO] [stdout] 8373 | Expr::Identifier(ident), [INFO] [stdout] ... [INFO] [stdout] 8387 | } [INFO] [stdout] 8388 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8622:57 [INFO] [stdout] | [INFO] [stdout] 8622 | / ... if let Some(ord) = [INFO] [stdout] 8623 | | ... value.compare(current_min) [INFO] [stdout] 8624 | | ... { [INFO] [stdout] 8625 | | ... if ord.is_lt() { [INFO] [stdout] ... | [INFO] [stdout] 8628 | | ... } [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] 8623 ~ value.compare(current_min) [INFO] [stdout] 8624 ~ && ord.is_lt() { [INFO] [stdout] 8625 | min_value = Some(value); [INFO] [stdout] 8626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:8666:57 [INFO] [stdout] | [INFO] [stdout] 8666 | / ... if let Some(ord) = [INFO] [stdout] 8667 | | ... value.compare(current_max) [INFO] [stdout] 8668 | | ... { [INFO] [stdout] 8669 | | ... if ord.is_gt() { [INFO] [stdout] ... | [INFO] [stdout] 8672 | | ... } [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] 8667 ~ value.compare(current_max) [INFO] [stdout] 8668 ~ && ord.is_gt() { [INFO] [stdout] 8669 | max_value = Some(value); [INFO] [stdout] 8670 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:9320:21 [INFO] [stdout] | [INFO] [stdout] 9320 | / if let Value::Text(s) = &low_value { [INFO] [stdout] 9321 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9322 | | low_value = Value::Date(date); [INFO] [stdout] 9323 | | } [INFO] [stdout] 9324 | | } [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] 9320 ~ if let Value::Text(s) = &low_value [INFO] [stdout] 9321 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9322 | low_value = Value::Date(date); [INFO] [stdout] 9323 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:9325:21 [INFO] [stdout] | [INFO] [stdout] 9325 | / if let Value::Text(s) = &high_value { [INFO] [stdout] 9326 | | if let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9327 | | high_value = Value::Date(date); [INFO] [stdout] 9328 | | } [INFO] [stdout] 9329 | | } [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] 9325 ~ if let Value::Text(s) = &high_value [INFO] [stdout] 9326 ~ && let Ok(date) = NaiveDate::parse_from_str(s, "%Y-%m-%d") { [INFO] [stdout] 9327 | high_value = Value::Date(date); [INFO] [stdout] 9328 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:10070:21 [INFO] [stdout] | [INFO] [stdout] 10070 | / if table_name == table_ref { [INFO] [stdout] 10071 | | if let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10072 | | let position = table_offsets[table_idx] + col_idx; [INFO] [stdout] 10073 | | return Ok(row.get(position).cloned().unwrap_or(Value::Null)); [INFO] [stdout] 10074 | | } [INFO] [stdout] 10075 | | } [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] 10070 ~ if table_name == table_ref [INFO] [stdout] 10071 ~ && let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10072 | let position = table_offsets[table_idx] + col_idx; [INFO] [stdout] 10073 | return Ok(row.get(position).cloned().unwrap_or(Value::Null)); [INFO] [stdout] 10074 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/sql/executor.rs:10618:33 [INFO] [stdout] | [INFO] [stdout] 10618 | / ... if table_identifier == table_ref { [INFO] [stdout] 10619 | | ... if let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10620 | | ... columns.push(JoinedColumn::TableColumn( [INFO] [stdout] 10621 | | ... alias.value.clone(), [INFO] [stdout] ... | [INFO] [stdout] 10627 | | ... } [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] 10618 ~ if table_identifier == table_ref [INFO] [stdout] 10619 ~ && let Some(col_idx) = table.get_column_index(column_name) { [INFO] [stdout] 10620 | columns.push(JoinedColumn::TableColumn( [INFO] [stdout] ... [INFO] [stdout] 10625 | break; [INFO] [stdout] 10626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:95:21 [INFO] [stdout] | [INFO] [stdout] 95 | / if let Some(open_paren) = ref_str.find('(') { [INFO] [stdout] 96 | | if let Some(close_paren) = ref_str.find(')') { [INFO] [stdout] 97 | | let table = ref_str[..open_paren].to_string(); [INFO] [stdout] 98 | | let col = ref_str[open_paren + 1..close_paren].to_string(); [INFO] [stdout] ... | [INFO] [stdout] 102 | | } [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] 95 ~ if let Some(open_paren) = ref_str.find('(') [INFO] [stdout] 96 ~ && let Some(close_paren) = ref_str.find(')') { [INFO] [stdout] 97 | let table = ref_str[..open_paren].to_string(); [INFO] [stdout] ... [INFO] [stdout] 100 | column.references = Some(ForeignKeyRef { table, column: col }); [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Some(start) = type_str.find('(') { [INFO] [stdout] 170 | | if let Some(end) = type_str.find(')') { [INFO] [stdout] 171 | | return type_str[start + 1..end].parse().ok(); [INFO] [stdout] 172 | | } [INFO] [stdout] 173 | | } [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] 169 ~ if let Some(start) = type_str.find('(') [INFO] [stdout] 170 ~ && let Some(end) = type_str.find(')') { [INFO] [stdout] 171 | return type_str[start + 1..end].parse().ok(); [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | / if let Some(start) = type_str.find('(') { [INFO] [stdout] 189 | | if let Some(end) = type_str.find(')') { [INFO] [stdout] 190 | | let params = &type_str[start + 1..end]; [INFO] [stdout] 191 | | let parts: Vec<&str> = params.split(',').collect(); [INFO] [stdout] ... | [INFO] [stdout] 202 | | } [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] 188 ~ if let Some(start) = type_str.find('(') [INFO] [stdout] 189 ~ && let Some(end) = type_str.find(')') { [INFO] [stdout] 190 | let params = &type_str[start + 1..end]; [INFO] [stdout] ... [INFO] [stdout] 200 | } [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/yaml/schema.rs:196:20 [INFO] [stdout] | [INFO] [stdout] 196 | } else if parts.len() == 1 { [INFO] [stdout] | ____________________^ [INFO] [stdout] 197 | | if let Ok(p) = parts[0].trim().parse() { [INFO] [stdout] 198 | | return Some((p, 0)); [INFO] [stdout] 199 | | } [INFO] [stdout] 200 | | } [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] 196 ~ } else if parts.len() == 1 [INFO] [stdout] 197 ~ && let Ok(p) = parts[0].trim().parse() { [INFO] [stdout] 198 | return Some((p, 0)); [INFO] [stdout] 199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/error_context.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | / if let Some(start) = error_lower.find(pattern) { [INFO] [stdout] 52 | | if let Some(name_start) = error[start..].find('\'') { [INFO] [stdout] 53 | | if let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] 54 | | let name = [INFO] [stdout] ... | [INFO] [stdout] 64 | | } [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] 51 ~ if let Some(start) = error_lower.find(pattern) [INFO] [stdout] 52 ~ && let Some(name_start) = error[start..].find('\'') { [INFO] [stdout] 53 | if let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] ... [INFO] [stdout] 62 | } [INFO] [stdout] 63 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/error_context.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | / if let Some(name_start) = error[start..].find('\'') { [INFO] [stdout] 53 | | if let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] 54 | | let name = [INFO] [stdout] 55 | | &error[start + name_start + 1..start + name_start + 1 + name_end]; [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [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] 52 ~ if let Some(name_start) = error[start..].find('\'') [INFO] [stdout] 53 ~ && let Some(name_end) = error[start + name_start + 1..].find('\'') { [INFO] [stdout] 54 | let name = [INFO] [stdout] ... [INFO] [stdout] 61 | } [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `matrix` [INFO] [stdout] --> src/error_context.rs:251:14 [INFO] [stdout] | [INFO] [stdout] 251 | for j in 0..=len2 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 251 - for j in 0..=len2 { [INFO] [stdout] 251 + for (j, ) in matrix.iter_mut().enumerate().take(len2 + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/query_logger.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | / if let Some(ref file_path) = self.config.file_path { [INFO] [stdout] 173 | | if let Err(e) = self.write_to_file(&entry, file_path).await { [INFO] [stdout] 174 | | error!("Failed to write query log to file: {}", e); [INFO] [stdout] 175 | | } [INFO] [stdout] 176 | | } [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] 172 ~ if let Some(ref file_path) = self.config.file_path [INFO] [stdout] 173 ~ && let Err(e) = self.write_to_file(&entry, file_path).await { [INFO] [stdout] 174 | error!("Failed to write query log to file: {}", e); [INFO] [stdout] 175 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 13s [INFO] running `Command { std: "docker" "inspect" "a719e214454147ca55b938863d6df29e901feb3c64c0a7b66ed999466c3f5396", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a719e214454147ca55b938863d6df29e901feb3c64c0a7b66ed999466c3f5396", kill_on_drop: false }` [INFO] [stdout] a719e214454147ca55b938863d6df29e901feb3c64c0a7b66ed999466c3f5396