[INFO] cloning repository https://github.com/tsmarsh/rustql [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tsmarsh/rustql" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftsmarsh%2Frustql", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftsmarsh%2Frustql'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e269c2d16d4559398d78ee472c4745a9edb9e7f6 [INFO] linting tsmarsh/rustql against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftsmarsh%2Frustql" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/tsmarsh/rustql [INFO] finished tweaking git repo https://github.com/tsmarsh/rustql [INFO] tweaked toml for git repo https://github.com/tsmarsh/rustql written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tsmarsh/rustql on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/tsmarsh/rustql 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] c03a1fdcdb7ec8850d45a83385d9f5a34f7cd34e3e99066d3337334e54b85f8b [INFO] running `Command { std: "docker" "start" "-a" "c03a1fdcdb7ec8850d45a83385d9f5a34f7cd34e3e99066d3337334e54b85f8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c03a1fdcdb7ec8850d45a83385d9f5a34f7cd34e3e99066d3337334e54b85f8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c03a1fdcdb7ec8850d45a83385d9f5a34f7cd34e3e99066d3337334e54b85f8b", kill_on_drop: false }` [INFO] [stdout] c03a1fdcdb7ec8850d45a83385d9f5a34f7cd34e3e99066d3337334e54b85f8b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] c464ab739da6f65bb81da1c2ef027f4b3de53e2c12074b1f2680951a74316bb4 [INFO] running `Command { std: "docker" "start" "-a" "c464ab739da6f65bb81da1c2ef027f4b3de53e2c12074b1f2680951a74316bb4", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.179 [INFO] [stderr] Compiling rustql v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking rustix v1.1.3 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stdout] warning: unexpected `cfg` condition value: `sqlite3-ffi` [INFO] [stdout] --> build.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | #[cfg(feature = "sqlite3-ffi")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `crossterm`, `default`, `fts3`, `fts5`, `json`, `rtree`, `session`, `tcl`, and `tui` [INFO] [stdout] = help: consider adding `sqlite3-ffi` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking tempfile v3.24.0 [INFO] [stdout] warning: unused import: `WhereLevelFlags` [INFO] [stdout] --> src/executor/select/mod.rs:15:71 [INFO] [stdout] | [INFO] [stdout] 15 | IndexInfo, OrBranch, QueryPlanner, TermOp, WhereInfo, WhereLevel, WhereLevelFlags, WherePlan, [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: `WindowCompiler` [INFO] [stdout] --> src/executor/select/mod.rs:18:60 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::executor::window::{select_has_window_functions, WindowCompiler}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/executor/trigger.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / /// Track trigger compilation depth to prevent infinite compile-time recursion. [INFO] [stdout] 18 | | /// SQLite handles recursive triggers at runtime via the trigger_depth counter. [INFO] [stdout] 19 | | /// By default, recursive triggers are OFF in SQLite. We limit compile-time nesting [INFO] [stdout] 20 | | /// to prevent stack overflow; runtime trigger_depth checking prevents infinite execution. [INFO] [stdout] | |_-----------------------------------------------------------------------------------------^ [INFO] [stdout] | | [INFO] [stdout] | rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DeleteStmt`, `InsertStmt`, and `UpdateStmt` [INFO] [stdout] --> src/parser/grammar.rs:2041:34 [INFO] [stdout] | [INFO] [stdout] 2041 | use crate::parser::ast::{DeleteStmt, IndexedBy, InsertStmt, Stmt, UpdateStmt}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `SerialType` and `decode_record_header` [INFO] [stdout] --> src/vdbe/engine/mod.rs:1066:36 [INFO] [stdout] | [INFO] [stdout] 1066 | use crate::vdbe::auxdata::{decode_record_header, SerialType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/vdbe/engine/mod.rs:2312:28 [INFO] [stdout] | [INFO] [stdout] 2312 | if (need_root_lookup || table_meta.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 2312 - if (need_root_lookup || table_meta.is_none()) { [INFO] [stdout] 2312 + if need_root_lookup || table_meta.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WhereLevelFlags` [INFO] [stdout] --> src/executor/select/mod.rs:15:71 [INFO] [stdout] | [INFO] [stdout] 15 | IndexInfo, OrBranch, QueryPlanner, TermOp, WhereInfo, WhereLevel, WhereLevelFlags, WherePlan, [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: `WindowCompiler` [INFO] [stdout] --> src/executor/select/mod.rs:18:60 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::executor::window::{select_has_window_functions, WindowCompiler}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/executor/trigger.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / /// Track trigger compilation depth to prevent infinite compile-time recursion. [INFO] [stdout] 18 | | /// SQLite handles recursive triggers at runtime via the trigger_depth counter. [INFO] [stdout] 19 | | /// By default, recursive triggers are OFF in SQLite. We limit compile-time nesting [INFO] [stdout] 20 | | /// to prevent stack overflow; runtime trigger_depth checking prevents infinite execution. [INFO] [stdout] | |_-----------------------------------------------------------------------------------------^ [INFO] [stdout] | | [INFO] [stdout] | rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DeleteStmt`, `InsertStmt`, and `UpdateStmt` [INFO] [stdout] --> src/parser/grammar.rs:2041:34 [INFO] [stdout] | [INFO] [stdout] 2041 | use crate::parser::ast::{DeleteStmt, IndexedBy, InsertStmt, Stmt, UpdateStmt}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `SerialType` and `decode_record_header` [INFO] [stdout] --> src/vdbe/engine/mod.rs:1066:36 [INFO] [stdout] | [INFO] [stdout] 1066 | use crate::vdbe::auxdata::{decode_record_header, SerialType}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/vdbe/engine/mod.rs:2312:28 [INFO] [stdout] | [INFO] [stdout] 2312 | if (need_root_lookup || table_meta.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 2312 - if (need_root_lookup || table_meta.is_none()) { [INFO] [stdout] 2312 + if need_root_lookup || table_meta.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_str_upper` [INFO] [stdout] --> src/api/connection.rs:1861:13 [INFO] [stdout] | [INFO] [stdout] 1861 | let col_str_upper = col_str.to_uppercase(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_str_upper` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `table_name` [INFO] [stdout] --> src/executor/delete.rs:1663:55 [INFO] [stdout] | [INFO] [stdout] 1663 | crate::parser::ast::InList::Table(table_name) => { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_table_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `table_schema_lower` [INFO] [stdout] --> src/executor/prepare.rs:3496:17 [INFO] [stdout] | [INFO] [stdout] 3496 | let table_schema_lower = table_schema.to_lowercase(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_table_schema_lower` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/executor/prepare.rs:4711:13 [INFO] [stdout] | [INFO] [stdout] 4711 | _ => "?".to_string(), // Fallback for any remaining expressions [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/executor/prepare.rs:4711:13 [INFO] [stdout] | [INFO] [stdout] 4488 | Expr::Literal(lit) => match lit { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4499 | Expr::Column(col) => { [INFO] [stdout] | ----------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4506 | Expr::Binary { op, left, right } => { [INFO] [stdout] | -------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4538 | Expr::Unary { op, expr: inner } => { [INFO] [stdout] | ------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4711 | _ => "?".to_string(), // Fallback for any remaining expressions [INFO] [stdout] | ^ ...and 15 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key_base_reg` [INFO] [stdout] --> src/executor/select/mod.rs:2126:25 [INFO] [stdout] | [INFO] [stdout] 2126 | let key_base_reg = self.next_reg; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_base_reg` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loop_start_label` [INFO] [stdout] --> src/executor/select/mod.rs:2632:13 [INFO] [stdout] | [INFO] [stdout] 2632 | let loop_start_label = *loop_labels.last().unwrap_or(&self.alloc_label()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loop_start_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key_base_reg` [INFO] [stdout] --> src/executor/select/mod.rs:2743:47 [INFO] [stdout] | [INFO] [stdout] 2743 | let (is_index_scan, index_cursor, key_base_reg, key_count, is_rowid_eq) = scan_info [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_base_reg` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key_count` [INFO] [stdout] --> src/executor/select/mod.rs:2743:61 [INFO] [stdout] | [INFO] [stdout] 2743 | let (is_index_scan, index_cursor, key_base_reg, key_count, is_rowid_eq) = scan_info [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loop_start_label` [INFO] [stdout] --> src/executor/select/mod.rs:4336:13 [INFO] [stdout] | [INFO] [stdout] 4336 | let loop_start_label = *loop_labels.last().unwrap_or(&self.alloc_label()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loop_start_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/executor/select/mod.rs:5319:18 [INFO] [stdout] | [INFO] [stdout] 5319 | for (idx, maybe_offset) in non_agg_indices.iter().enumerate() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_idx` [INFO] [stdout] --> src/executor/select/mod.rs:6992:29 [INFO] [stdout] | [INFO] [stdout] 6992 | if let Some(col_idx) = self [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `level` [INFO] [stdout] --> src/executor/select/mod.rs:7188:9 [INFO] [stdout] | [INFO] [stdout] 7188 | level: &WhereLevel, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_level` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `table_cursor` [INFO] [stdout] --> src/executor/select/mod.rs:10173:9 [INFO] [stdout] | [INFO] [stdout] 10173 | table_cursor: i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_table_cursor` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `where_info` [INFO] [stdout] --> src/executor/select/mod.rs:10178:9 [INFO] [stdout] | [INFO] [stdout] 10178 | where_info: &Option, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_where_info` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/executor/update.rs:1065:17 [INFO] [stdout] | [INFO] [stdout] 1065 | let mut all_match_label = conflict_label; [INFO] [stdout] | ----^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx_name` [INFO] [stdout] --> src/executor/update.rs:1002:14 [INFO] [stdout] | [INFO] [stdout] 1002 | for (idx_name, col_indices) in unique_checks { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_idx_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ipk_col` [INFO] [stdout] --> src/executor/update.rs:1391:13 [INFO] [stdout] | [INFO] [stdout] 1391 | let ipk_col = self.get_ipk_column_index(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ipk_col` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `is_leaf` [INFO] [stdout] --> src/rtree.rs:757:49 [INFO] [stdout] | [INFO] [stdout] 757 | pub fn deserialize_node(&self, data: &[u8], is_leaf: bool) -> Result> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `root_limits` [INFO] [stdout] --> src/storage/btree/mod.rs:4396:33 [INFO] [stdout] | [INFO] [stdout] 4396 | let (root_mem_page, root_limits) = _cursor.load_page(&mut shared_guard, root_pgno)?; [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_root_limits` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `col_str_upper` [INFO] [stdout] --> src/api/connection.rs:1861:13 [INFO] [stdout] | [INFO] [stdout] 1861 | let col_str_upper = col_str.to_uppercase(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_str_upper` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/vdbe/engine/mod.rs:8554:13 [INFO] [stdout] | [INFO] [stdout] 3322 | Opcode::Count => { [INFO] [stdout] | ------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 8554 | Opcode::Count => { [INFO] [stdout] | ^^^^^^^^^^^^^ no value can reach this [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `table_name` [INFO] [stdout] --> src/executor/delete.rs:1663:55 [INFO] [stdout] | [INFO] [stdout] 1663 | crate::parser::ast::InList::Table(table_name) => { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_table_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/vdbe/engine/mod.rs:5067:37 [INFO] [stdout] | [INFO] [stdout] 5067 | ... let mut text = None; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/vdbe/engine/mod.rs:5846:25 [INFO] [stdout] | [INFO] [stdout] 5846 | let mut skip_final_insert = false; [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `index_table_name` is assigned to, but never used [INFO] [stdout] --> src/vdbe/engine/mod.rs:2216:25 [INFO] [stdout] | [INFO] [stdout] 2216 | let mut index_table_name: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_index_table_name` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:3099:25 [INFO] [stdout] | [INFO] [stdout] 3099 | let btree = self.btree.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:3396:21 [INFO] [stdout] | [INFO] [stdout] 3396 | let btree = self.btree.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5057:33 [INFO] [stdout] | [INFO] [stdout] 5057 | ... let btree = self.btree.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `schema` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5058:33 [INFO] [stdout] | [INFO] [stdout] 5058 | ... let schema = self.schema.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_schema` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vtab_name` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5068:46 [INFO] [stdout] | [INFO] [stdout] 5068 | ... if let (Some(vtab_name), Some(rowid)) = [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_vtab_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rowid` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5068:63 [INFO] [stdout] | [INFO] [stdout] 5068 | ... if let (Some(vtab_name), Some(rowid)) = [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_rowid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5374:21 [INFO] [stdout] | [INFO] [stdout] 5374 | let btree = btree_arc.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:6125:21 [INFO] [stdout] | [INFO] [stdout] 6125 | let btree = btree_arc.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `schema` [INFO] [stdout] --> src/vdbe/engine/mod.rs:6126:21 [INFO] [stdout] | [INFO] [stdout] 6126 | let schema = self.schema.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_schema` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:6292:37 [INFO] [stdout] | [INFO] [stdout] 6292 | if let Some(ref btree) = btree_arc { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2270:45 [INFO] [stdout] | [INFO] [stdout] 2270 | ... index_table_name = Some(index.table.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2290:53 [INFO] [stdout] | [INFO] [stdout] 2290 | ... index_table_name = Some(idx.table.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2348:57 [INFO] [stdout] | [INFO] [stdout] 2348 | ... index_table_name = [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2370:65 [INFO] [stdout] | [INFO] [stdout] 2370 | ... index_table_name = [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `table_schema_lower` [INFO] [stdout] --> src/executor/prepare.rs:3496:17 [INFO] [stdout] | [INFO] [stdout] 3496 | let table_schema_lower = table_schema.to_lowercase(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_table_schema_lower` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/executor/prepare.rs:4711:13 [INFO] [stdout] | [INFO] [stdout] 4711 | _ => "?".to_string(), // Fallback for any remaining expressions [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/executor/prepare.rs:4711:13 [INFO] [stdout] | [INFO] [stdout] 4488 | Expr::Literal(lit) => match lit { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4499 | Expr::Column(col) => { [INFO] [stdout] | ----------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4506 | Expr::Binary { op, left, right } => { [INFO] [stdout] | -------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4538 | Expr::Unary { op, expr: inner } => { [INFO] [stdout] | ------------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 4711 | _ => "?".to_string(), // Fallback for any remaining expressions [INFO] [stdout] | ^ ...and 15 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `storage::btree::types::BtTableLockEntry` is more private than the item `storage::btree::BtShared::table_locks` [INFO] [stdout] --> src/storage/btree/mod.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | pub table_locks: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `storage::btree::BtShared::table_locks` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `storage::btree::types::BtTableLockEntry` is only usable at visibility `pub(crate)` [INFO] [stdout] --> src/storage/btree/types.rs:323:1 [INFO] [stdout] | [INFO] [stdout] 323 | pub(crate) struct BtTableLockEntry { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api/connection.rs:701:21 [INFO] [stdout] | [INFO] [stdout] 701 | pub collations: HashMap std::cmp::Ordering + Send + Sync>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api/connection.rs:937:10 [INFO] [stdout] | [INFO] [stdout] 937 | ) -> Option std::cmp::Ordering + Send + Sync>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.dbs.get(0)` [INFO] [stdout] --> src/api/connection.rs:1014:36 [INFO] [stdout] | [INFO] [stdout] 1014 | if let Some(main_schema) = self.dbs.get(0).and_then(|db| db.schema.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.dbs.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: unused variable: `key_base_reg` [INFO] [stdout] --> src/executor/select/mod.rs:2126:25 [INFO] [stdout] | [INFO] [stdout] 2126 | let key_base_reg = self.next_reg; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_base_reg` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loop_start_label` [INFO] [stdout] --> src/executor/select/mod.rs:2632:13 [INFO] [stdout] | [INFO] [stdout] 2632 | let loop_start_label = *loop_labels.last().unwrap_or(&self.alloc_label()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loop_start_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key_base_reg` [INFO] [stdout] --> src/executor/select/mod.rs:2743:47 [INFO] [stdout] | [INFO] [stdout] 2743 | let (is_index_scan, index_cursor, key_base_reg, key_count, is_rowid_eq) = scan_info [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_base_reg` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key_count` [INFO] [stdout] --> src/executor/select/mod.rs:2743:61 [INFO] [stdout] | [INFO] [stdout] 2743 | let (is_index_scan, index_cursor, key_base_reg, key_count, is_rowid_eq) = scan_info [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.dbs.get(0)` [INFO] [stdout] --> src/api/connection.rs:1399:36 [INFO] [stdout] | [INFO] [stdout] 1399 | if let Some(main_schema) = self.dbs.get(0).and_then(|db| db.schema.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.dbs.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 pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1451:22 [INFO] [stdout] | [INFO] [stdout] 1451 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 1451 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1451 + if let (Some(btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1451:39 [INFO] [stdout] | [INFO] [stdout] 1451 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1451 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1451 + if let (Some(ref btree), Some(schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1468:22 [INFO] [stdout] | [INFO] [stdout] 1468 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1468 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1468 + if let (Some(btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1468:39 [INFO] [stdout] | [INFO] [stdout] 1468 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1468 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1468 + if let (Some(ref btree), Some(schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1555:30 [INFO] [stdout] | [INFO] [stdout] 1555 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1555 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1555 + if let (Some(btree), Some(ref schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1555:47 [INFO] [stdout] | [INFO] [stdout] 1555 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1555 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1555 + if let (Some(ref btree), Some(schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1568:30 [INFO] [stdout] | [INFO] [stdout] 1568 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1568 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1568 + if let (Some(btree), Some(ref schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1568:47 [INFO] [stdout] | [INFO] [stdout] 1568 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1568 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1568 + if let (Some(ref btree), Some(schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1613:24 [INFO] [stdout] | [INFO] [stdout] 1613 | let obj_type = values.get(0).map(Mem::to_str).unwrap_or_default(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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 `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1715:38 [INFO] [stdout] | [INFO] [stdout] 1715 | let nodeno = values.get(0).map(|m| m.to_int()).unwrap_or(key); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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 `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1737:37 [INFO] [stdout] | [INFO] [stdout] 1737 | let rowid = values.get(0).map(|m| m.to_int()).unwrap_or(key); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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 `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1759:38 [INFO] [stdout] | [INFO] [stdout] 1759 | let nodeno = values.get(0).map(|m| m.to_int()).unwrap_or(key); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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` has identical blocks [INFO] [stdout] --> src/api/connection.rs:1877:60 [INFO] [stdout] | [INFO] [stdout] 1877 | } else if parts[i].eq_ignore_ascii_case("ASC") { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 1878 | | i += 1; [INFO] [stdout] 1879 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/api/connection.rs:1879:20 [INFO] [stdout] | [INFO] [stdout] 1879 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 1880 | | i += 1; [INFO] [stdout] 1881 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loop_start_label` [INFO] [stdout] --> src/executor/select/mod.rs:4336:13 [INFO] [stdout] | [INFO] [stdout] 4336 | let loop_start_label = *loop_labels.last().unwrap_or(&self.alloc_label()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loop_start_label` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api/session.rs:45:19 [INFO] [stdout] | [INFO] [stdout] 45 | table_filter: Option bool + Send + Sync>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/api/session.rs:381:5 [INFO] [stdout] | [INFO] [stdout] 381 | / pub fn next(&mut self) -> Result> { [INFO] [stdout] 382 | | loop { [INFO] [stdout] 383 | | if self.pos >= self.data.len() { [INFO] [stdout] 384 | | return Ok(None); [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/executor/select/mod.rs:5319:18 [INFO] [stdout] | [INFO] [stdout] 5319 | for (idx, maybe_offset) in non_agg_indices.iter().enumerate() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `bind_idx` is used as a loop counter [INFO] [stdout] --> src/api/session.rs:930:5 [INFO] [stdout] | [INFO] [stdout] 930 | for (idx, _) in pk_cols { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (bind_idx, (idx, _)) in (1..).zip(pk_cols.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: unused variable: `col_idx` [INFO] [stdout] --> src/executor/select/mod.rs:6992:29 [INFO] [stdout] | [INFO] [stdout] 6992 | if let Some(col_idx) = self [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_col_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `level` [INFO] [stdout] --> src/executor/select/mod.rs:7188:9 [INFO] [stdout] | [INFO] [stdout] 7188 | level: &WhereLevel, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_level` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/api/session.rs:1712:5 [INFO] [stdout] | [INFO] [stdout] 1712 | / pub fn next(&mut self) -> Result> { [INFO] [stdout] 1713 | | loop { [INFO] [stdout] 1714 | | // Ensure we have at least some data [INFO] [stdout] 1715 | | if !self.fill_buffer(1)? { [INFO] [stdout] ... | [INFO] [stdout] 1786 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/api/session.rs:1912:5 [INFO] [stdout] | [INFO] [stdout] 1912 | / loop { [INFO] [stdout] 1913 | | match sqlite3_step(&mut stmt)? { [INFO] [stdout] 1914 | | StepResult::Row => { [INFO] [stdout] 1915 | | let mut values = Vec::with_capacity(n_col as usize); [INFO] [stdout] ... | [INFO] [stdout] 1923 | | } [INFO] [stdout] | |_____^ help: try: `while let StepResult::Row = sqlite3_step(&mut stmt)? { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/api/session.rs:1932:5 [INFO] [stdout] | [INFO] [stdout] 1932 | / loop { [INFO] [stdout] 1933 | | match sqlite3_step(&mut stmt)? { [INFO] [stdout] 1934 | | StepResult::Row => { [INFO] [stdout] 1935 | | let mut values = Vec::with_capacity(n_col as usize); [INFO] [stdout] ... | [INFO] [stdout] 1943 | | } [INFO] [stdout] | |_____^ help: try: `while let StepResult::Row = sqlite3_step(&mut stmt)? { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/api/session.rs:1984:9 [INFO] [stdout] | [INFO] [stdout] 1984 | / loop { [INFO] [stdout] 1985 | | match sqlite3_step(&mut stmt)? { [INFO] [stdout] 1986 | | StepResult::Row => { [INFO] [stdout] 1987 | | let mut new_values = Vec::with_capacity(n_col as usize); [INFO] [stdout] ... | [INFO] [stdout] 2004 | | } [INFO] [stdout] | |_________^ help: try: `while let StepResult::Row = sqlite3_step(&mut stmt)? { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/api/stmt.rs:932:13 [INFO] [stdout] | [INFO] [stdout] 932 | / if let Value::Text(pattern) = value { [INFO] [stdout] 933 | | // Check if pattern has a usable prefix (doesn't start with wildcard) [INFO] [stdout] 934 | | if let Some(first_char) = pattern.chars().next() { [INFO] [stdout] ... | [INFO] [stdout] 945 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/api/stmt.rs:931:21 [INFO] [stdout] | [INFO] [stdout] 931 | if let Some(value) = params.get((*param_idx - 1) as usize) { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 932 | if let Value::Text(pattern) = value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/api/stmt.rs:1013:9 [INFO] [stdout] | [INFO] [stdout] 1013 | &*main_schema_guard, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&main_schema_guard` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `table_cursor` [INFO] [stdout] --> src/executor/select/mod.rs:10173:9 [INFO] [stdout] | [INFO] [stdout] 10173 | table_cursor: i32, [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_table_cursor` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `where_info` [INFO] [stdout] --> src/executor/select/mod.rs:10178:9 [INFO] [stdout] | [INFO] [stdout] 10178 | where_info: &Option, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_where_info` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | col.name = format!("col{}", i); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: format!("col{}", i), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | let mut col = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/executor/column_mapping.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | / if matches!(source, ColumnSource::Null) { [INFO] [stdout] 154 | | if target_columns[target_idx].default_value.is_some() { [INFO] [stdout] 155 | | *source = ColumnSource::DefaultValue; [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [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] 153 ~ if matches!(source, ColumnSource::Null) [INFO] [stdout] 154 ~ && target_columns[target_idx].default_value.is_some() { [INFO] [stdout] 155 | *source = ColumnSource::DefaultValue; [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/column_mapping.rs:173:28 [INFO] [stdout] | [INFO] [stdout] 173 | let first_is_ipk = target_columns.first().map_or(false, |col| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 174 | | col.is_primary_key [INFO] [stdout] 175 | | && col [INFO] [stdout] 176 | | .type_name [INFO] [stdout] 177 | | .as_ref() [INFO] [stdout] 178 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 179 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 173 - let first_is_ipk = target_columns.first().map_or(false, |col| { [INFO] [stdout] 173 + let first_is_ipk = target_columns.first().is_some_and(|col| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/column_mapping.rs:175:20 [INFO] [stdout] | [INFO] [stdout] 175 | && col [INFO] [stdout] | ____________________^ [INFO] [stdout] 176 | | .type_name [INFO] [stdout] 177 | | .as_ref() [INFO] [stdout] 178 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 178 - .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 178 + .is_some_and(|t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/column_mapping.rs:184:20 [INFO] [stdout] | [INFO] [stdout] 184 | && col [INFO] [stdout] | ____________________^ [INFO] [stdout] 185 | | .type_name [INFO] [stdout] 186 | | .as_ref() [INFO] [stdout] 187 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")); [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 187 - .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")); [INFO] [stdout] 187 + .is_some_and(|t| t.eq_ignore_ascii_case("INTEGER")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/executor/column_mapping.rs:243:68 [INFO] [stdout] | [INFO] [stdout] 243 | .find(|(_, col)| col.name.to_lowercase() == name_lower) [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 244 | | .map(|(idx, col)| (idx, col)) [INFO] [stdout] | |_________________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/executor/delete.rs:897:17 [INFO] [stdout] | [INFO] [stdout] 897 | / match &func_call.args { [INFO] [stdout] 898 | | crate::parser::ast::FunctionArgs::Exprs(exprs) => { [INFO] [stdout] 899 | | for arg in exprs { [INFO] [stdout] 900 | | self.validate_expr_columns(arg)?; [INFO] [stdout] ... | [INFO] [stdout] 903 | | _ => {} [INFO] [stdout] 904 | | } [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] 897 ~ if let crate::parser::ast::FunctionArgs::Exprs(exprs) = &func_call.args { [INFO] [stdout] 898 + for arg in exprs { [INFO] [stdout] 899 + self.validate_expr_columns(arg)?; [INFO] [stdout] 900 + } [INFO] [stdout] 901 + } [INFO] [stdout] | [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/executor/delete.rs:917:17 [INFO] [stdout] | [INFO] [stdout] 917 | / match list { [INFO] [stdout] 918 | | crate::parser::ast::InList::Values(exprs) => { [INFO] [stdout] 919 | | for val_expr in exprs { [INFO] [stdout] 920 | | self.validate_expr_columns(val_expr)?; [INFO] [stdout] ... | [INFO] [stdout] 923 | | _ => {} [INFO] [stdout] 924 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 917 ~ if let crate::parser::ast::InList::Values(exprs) = list { [INFO] [stdout] 918 + for val_expr in exprs { [INFO] [stdout] 919 + self.validate_expr_columns(val_expr)?; [INFO] [stdout] 920 + } [INFO] [stdout] 921 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/delete.rs:1337:88 [INFO] [stdout] | [INFO] [stdout] 1337 | if op.opcode == Opcode::OpenRead || op.opcode == Opcode::OpenWrite { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 1338 | | op.p1 += cursor_offset; [INFO] [stdout] 1339 | | } else if matches!( [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/delete.rs:1362:23 [INFO] [stdout] | [INFO] [stdout] 1362 | ) { [INFO] [stdout] | _______________________^ [INFO] [stdout] 1363 | | op.p1 += cursor_offset; [INFO] [stdout] 1364 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/executor/delete.rs:1818:37 [INFO] [stdout] | [INFO] [stdout] 1818 | fn from_clause_references_table(&self, from: &crate::parser::ast::FromClause) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/executor/delete.rs:1862:17 [INFO] [stdout] | [INFO] [stdout] 1862 | / if self.select_references_table(select) { [INFO] [stdout] 1863 | | let idx = self.subquery_counter; [INFO] [stdout] 1864 | | self.subquery_counter += 1; [INFO] [stdout] 1865 | | result.push((idx, select)); [INFO] [stdout] 1866 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1861 ~ Expr::Subquery(select) [INFO] [stdout] 1862 ~ if self.select_references_table(select) => { [INFO] [stdout] 1863 | let idx = self.subquery_counter; [INFO] [stdout] 1864 | self.subquery_counter += 1; [INFO] [stdout] 1865 | result.push((idx, select)); [INFO] [stdout] 1866 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/delete.rs:1978:84 [INFO] [stdout] | [INFO] [stdout] 1978 | if op.opcode == Opcode::OpenRead || op.opcode == Opcode::OpenWrite { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 1979 | | op.p1 += cursor_offset; [INFO] [stdout] 1980 | | } else if matches!( [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/delete.rs:2003:19 [INFO] [stdout] | [INFO] [stdout] 2003 | ) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 2004 | | op.p1 += cursor_offset; [INFO] [stdout] 2005 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/executor/insert.rs:491:17 [INFO] [stdout] | [INFO] [stdout] 491 | / if i < row.len() { [INFO] [stdout] 492 | | if matches!(target, InsertColumnTarget::Rowid) { [INFO] [stdout] 493 | | has_explicit_rowid = true; [INFO] [stdout] 494 | | explicit_rowid_idx = i; [INFO] [stdout] ... | [INFO] [stdout] 497 | | } [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] 491 ~ if i < row.len() [INFO] [stdout] 492 ~ && matches!(target, InsertColumnTarget::Rowid) { [INFO] [stdout] 493 | has_explicit_rowid = true; [INFO] [stdout] 494 | explicit_rowid_idx = i; [INFO] [stdout] 495 | break; [INFO] [stdout] 496 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/executor/insert.rs:964:25 [INFO] [stdout] | [INFO] [stdout] 964 | .map(|cols| cols.iter().map(|c| c.clone()).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `cols.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/executor/insert.rs:1299:25 [INFO] [stdout] | [INFO] [stdout] 1299 | .map(|cols| cols.iter().map(|c| c.clone()).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `cols.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/insert.rs:1454:17 [INFO] [stdout] | [INFO] [stdout] 1454 | / if let TableRef::Table { name, .. } = table_ref { [INFO] [stdout] 1455 | | return Ok(name.name.clone()); [INFO] [stdout] 1456 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/insert.rs:1453:25 [INFO] [stdout] | [INFO] [stdout] 1453 | if let Some(table_ref) = from.tables.first() { [INFO] [stdout] | ^^^^^^^^^ replace this binding [INFO] [stdout] 1454 | if let TableRef::Table { name, .. } = table_ref { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/executor/insert.rs:1833:45 [INFO] [stdout] | [INFO] [stdout] 1833 | SelectBody::Select(core) => !core.group_by.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core.group_by.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/insert.rs:2190:80 [INFO] [stdout] | [INFO] [stdout] 2190 | if op.opcode == Opcode::OpenRead || op.opcode == Opcode::OpenWrite { [INFO] [stdout] | ________________________________________________________________________________^ [INFO] [stdout] 2191 | | op.p1 += cursor_offset; [INFO] [stdout] 2192 | | } else if matches!( [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/insert.rs:2215:15 [INFO] [stdout] | [INFO] [stdout] 2215 | ) { [INFO] [stdout] | _______________^ [INFO] [stdout] 2216 | | op.p1 += cursor_offset; [INFO] [stdout] 2217 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/insert.rs:2777:34 [INFO] [stdout] | [INFO] [stdout] 2777 | let is_ipk = col.map_or(false, |c| { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 2778 | | c.is_primary_key [INFO] [stdout] 2779 | | && c.type_name [INFO] [stdout] 2780 | | .as_ref() [INFO] [stdout] 2781 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 2782 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2777 - let is_ipk = col.map_or(false, |c| { [INFO] [stdout] 2777 + let is_ipk = col.is_some_and(|c| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/insert.rs:2779:32 [INFO] [stdout] | [INFO] [stdout] 2779 | ... && c.type_name [INFO] [stdout] | __________________________^ [INFO] [stdout] 2780 | | ... .as_ref() [INFO] [stdout] 2781 | | ... .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | |_______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2781 - .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 2781 + .is_some_and(|t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConflictAction` which implements the `Copy` trait [INFO] [stdout] --> src/executor/insert.rs:3144:63 [INFO] [stdout] | [INFO] [stdout] 3144 | ... return self.schema_conflict_flags(conflict.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*conflict` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/executor/insert.rs:3304:21 [INFO] [stdout] | [INFO] [stdout] 3304 | / format!( [INFO] [stdout] 3305 | | "no such column: \"\" - should this be a string literal in single-quotes?" [INFO] [stdout] 3306 | | ) [INFO] [stdout] | |_____________________^ help: consider using `.to_string()`: `"no such column: \"\" - should this be a string literal in single-quotes?".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/insert.rs:3889:53 [INFO] [stdout] | [INFO] [stdout] 3889 | let items: Vec<_> = list.iter().map(|e| Self::expr_to_sql(e)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_to_sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/insert.rs:3897:53 [INFO] [stdout] | [INFO] [stdout] 3897 | let parts: Vec<_> = args.iter().map(|e| Self::expr_to_sql(e)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_to_sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/insert.rs:4029:34 [INFO] [stdout] | [INFO] [stdout] 4029 | let mut all_indexes: Vec<( [INFO] [stdout] | __________________________________^ [INFO] [stdout] 4030 | | String, [INFO] [stdout] 4031 | | Vec, [INFO] [stdout] 4032 | | i32, [INFO] [stdout] ... | [INFO] [stdout] 4035 | | Option, [INFO] [stdout] 4036 | | )> = Vec::new(); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/executor/insert.rs:4080:13 [INFO] [stdout] | [INFO] [stdout] 4080 | all_indexes.sort_by(|a, b| b.2.cmp(&a.2)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 4080 - all_indexes.sort_by(|a, b| b.2.cmp(&a.2)); [INFO] [stdout] 4080 + all_indexes.sort_by_key(|b| std::cmp::Reverse(b.2)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/pragma.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 180 | / let mut rows = Vec::new(); [INFO] [stdout] 181 | | rows.push(vec![Value::Integer(0), Value::Text("BINARY".to_string())]); [INFO] [stdout] 182 | | rows.push(vec![Value::Integer(1), Value::Text("NOCASE".to_string())]); [INFO] [stdout] 183 | | rows.push(vec![Value::Integer(2), Value::Text("RTRIM".to_string())]); [INFO] [stdout] | |_________________________________________________________________________________^ help: consider using the `vec![]` macro: `let rows = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/executor/update.rs:1065:17 [INFO] [stdout] | [INFO] [stdout] 1065 | let mut all_match_label = conflict_label; [INFO] [stdout] | ----^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx_name` [INFO] [stdout] --> src/executor/update.rs:1002:14 [INFO] [stdout] | [INFO] [stdout] 1002 | for (idx_name, col_indices) in unique_checks { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_idx_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ipk_col` [INFO] [stdout] --> src/executor/update.rs:1391:13 [INFO] [stdout] | [INFO] [stdout] 1391 | let ipk_col = self.get_ipk_column_index(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ipk_col` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/executor/pragma.rs:1530:5 [INFO] [stdout] | [INFO] [stdout] 1530 | / match value.to_lowercase().as_str() { [INFO] [stdout] 1531 | | "on" | "yes" | "true" | "1" => true, [INFO] [stdout] 1532 | | _ => false, [INFO] [stdout] 1533 | | } [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] 1530 - match value.to_lowercase().as_str() { [INFO] [stdout] 1531 - "on" | "yes" | "true" | "1" => true, [INFO] [stdout] 1532 - _ => false, [INFO] [stdout] 1533 - } [INFO] [stdout] 1530 + matches!(value.to_lowercase().as_str(), "on" | "yes" | "true" | "1") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/prepare.rs:574:10 [INFO] [stdout] | [INFO] [stdout] 574 | ) -> Result<(Vec, StmtType, Vec, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `term` [INFO] [stdout] --> src/executor/where_clause.rs:3002:13 [INFO] [stdout] | [INFO] [stdout] 3002 | for term in planner.where_clause.terms.iter_mut() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_term` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:2841:21 [INFO] [stdout] | [INFO] [stdout] 2841 | / let mut ops = Vec::new(); [INFO] [stdout] 2842 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 2843 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_______________________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/executor/prepare.rs:3517:13 [INFO] [stdout] | [INFO] [stdout] 3517 | / if let Err(e) = self.validate_trigger_body_references(create, trigger_db_idx) { [INFO] [stdout] 3518 | | return Err(e); [INFO] [stdout] 3519 | | } [INFO] [stdout] | |_____________^ help: replace it with: `self.validate_trigger_body_references(create, trigger_db_idx)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4235:30 [INFO] [stdout] | [INFO] [stdout] 4235 | .map(|c| Self::join_constraint_has_parameters(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::join_constraint_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4239:33 [INFO] [stdout] | [INFO] [stdout] 4239 | args.iter().any(|e| Self::expr_has_parameters(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4312:53 [INFO] [stdout] | [INFO] [stdout] 4312 | Expr::Vector(exprs) => exprs.iter().any(|e| Self::expr_has_parameters(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4321:34 [INFO] [stdout] | [INFO] [stdout] 4321 | exprs.iter().any(|e| Self::expr_has_parameters(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/executor/prepare.rs:4936:27 [INFO] [stdout] | [INFO] [stdout] 4936 | fn from_clause_to_sql(&self, from: &FromClause) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:5054:46 [INFO] [stdout] | [INFO] [stdout] 5054 | let found = self.temp_schema.map(|s| check_exists(s)).unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&check_exists` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:5059:48 [INFO] [stdout] | [INFO] [stdout] 5059 | let in_temp = self.temp_schema.map(|s| check_exists(s)).unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&check_exists` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:5060:43 [INFO] [stdout] | [INFO] [stdout] 5060 | let in_main = self.schema.map(|s| check_exists(s)).unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `check_exists` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5117:13 [INFO] [stdout] | [INFO] [stdout] 5117 | / let mut ops = Vec::new(); [INFO] [stdout] 5118 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5119 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_______________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5203:9 [INFO] [stdout] | [INFO] [stdout] 5203 | / let mut ops = Vec::new(); [INFO] [stdout] 5204 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5205 | | ops.push(Self::make_op(Opcode::AutoCommit, 1, 0, 0, P4::Unused)); [INFO] [stdout] 5206 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5231:9 [INFO] [stdout] | [INFO] [stdout] 5231 | / let mut ops = Vec::new(); [INFO] [stdout] 5232 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5233 | | ops.push(Self::make_op( [INFO] [stdout] 5234 | | Opcode::Savepoint, [INFO] [stdout] ... | [INFO] [stdout] 5239 | | )); [INFO] [stdout] 5240 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5245:9 [INFO] [stdout] | [INFO] [stdout] 5245 | / let mut ops = Vec::new(); [INFO] [stdout] 5246 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5247 | | ops.push(Self::make_op( [INFO] [stdout] 5248 | | Opcode::Savepoint, [INFO] [stdout] ... | [INFO] [stdout] 5253 | | )); [INFO] [stdout] 5254 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/executor/prepare.rs:6082:60 [INFO] [stdout] | [INFO] [stdout] 6082 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 6083 | | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] 6084 | | _ => return result, [INFO] [stdout] 6085 | | }, [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/prepare.rs:6082:46 [INFO] [stdout] | [INFO] [stdout] 6082 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 6083 | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `expr: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually filling a slice [INFO] [stdout] --> src/executor/prepare.rs:6301:21 [INFO] [stdout] | [INFO] [stdout] 6301 | / for flag in &mut requires_all_cols { [INFO] [stdout] 6302 | | *flag = true; [INFO] [stdout] 6303 | | } [INFO] [stdout] | |_____________________^ help: try: `requires_all_cols.fill(true);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_fill [INFO] [stdout] = note: `#[warn(clippy::manual_slice_fill)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/executor/prepare.rs:6583:1 [INFO] [stdout] | [INFO] [stdout] 6583 | / pub fn compile_sql_with_full_config<'a>( [INFO] [stdout] 6584 | | sql: &'a str, [INFO] [stdout] 6585 | | schema: &crate::schema::Schema, [INFO] [stdout] 6586 | | temp_schema: Option<&crate::schema::Schema>, [INFO] [stdout] ... | [INFO] [stdout] 6593 | | dqs_dml: bool, [INFO] [stdout] 6594 | | ) -> Result<(CompiledStmt, &'a str)> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:576:45 [INFO] [stdout] | [INFO] [stdout] 576 | SelectBody::Select(core) => !core.group_by.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core.group_by.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/executor/select/mod.rs:1363:5 [INFO] [stdout] | [INFO] [stdout] 1363 | / fn emit_recursive_cte_process_cursor( [INFO] [stdout] 1364 | | &mut self, [INFO] [stdout] 1365 | | src_cursor: i32, [INFO] [stdout] 1366 | | work_cursor: i32, [INFO] [stdout] ... | [INFO] [stdout] 1373 | | done_label: i32, [INFO] [stdout] 1374 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `table_join_types` [INFO] [stdout] --> src/executor/select/mod.rs:1730:18 [INFO] [stdout] | [INFO] [stdout] 1730 | for i in 0..table_cursors.len() { [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] 1730 - for i in 0..table_cursors.len() { [INFO] [stdout] 1730 + for (i, ) in table_join_types.iter().enumerate().take(table_cursors.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/executor/select/mod.rs:2572:28 [INFO] [stdout] | [INFO] [stdout] 2572 | .chain(outer_conds.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 2572 - .chain(outer_conds.into_iter()) [INFO] [stdout] 2572 + .chain(outer_conds) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/executor/select/mod.rs:2715:13 [INFO] [stdout] | [INFO] [stdout] 2715 | / for found_match_reg in &found_match_regs { [INFO] [stdout] 2716 | | if let Some(reg) = found_match_reg { [INFO] [stdout] 2717 | | self.emit(Opcode::Integer, 1, *reg, 0, P4::Unused); [INFO] [stdout] 2718 | | } [INFO] [stdout] 2719 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/executor/select/mod.rs:2716:17 [INFO] [stdout] | [INFO] [stdout] 2716 | / if let Some(reg) = found_match_reg { [INFO] [stdout] 2717 | | self.emit(Opcode::Integer, 1, *reg, 0, P4::Unused); [INFO] [stdout] 2718 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2715 ~ for reg in found_match_regs.iter().flatten() { [INFO] [stdout] 2716 + self.emit(Opcode::Integer, 1, *reg, 0, P4::Unused); [INFO] [stdout] 2717 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/select/mod.rs:2945:20 [INFO] [stdout] | [INFO] [stdout] 2945 | funcs: &mut Vec<( [INFO] [stdout] | ____________________^ [INFO] [stdout] 2946 | | String, [INFO] [stdout] 2947 | | Vec, [INFO] [stdout] 2948 | | Option>, [INFO] [stdout] ... | [INFO] [stdout] 2952 | | usize, [INFO] [stdout] 2953 | | )>, [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/executor/select/mod.rs:4228:9 [INFO] [stdout] | [INFO] [stdout] 4228 | col_refs_to_save.sort_by(|a, b| (a.0, a.1).cmp(&(b.0, b.1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 4228 - col_refs_to_save.sort_by(|a, b| (a.0, a.1).cmp(&(b.0, b.1))); [INFO] [stdout] 4228 + col_refs_to_save.sort_by_key(|a| (a.0, a.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/executor/select/mod.rs:6201:67 [INFO] [stdout] | [INFO] [stdout] 6201 | .and_then(|schema| schema.table(&table_name_lower).map(|t| t.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/executor/select/mod.rs:6204:67 [INFO] [stdout] | [INFO] [stdout] 6204 | .and_then(|schema| schema.table(&table_name_lower).map(|t| t.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/executor/select/mod.rs:6209:72 [INFO] [stdout] | [INFO] [stdout] 6209 | .and_then(|(_, schema)| schema.table(&table_name_lower).map(|t| t.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/executor/select/mod.rs:6760:60 [INFO] [stdout] | [INFO] [stdout] 6760 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 6761 | | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] 6762 | | _ => return false, [INFO] [stdout] 6763 | | }, [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:6760:46 [INFO] [stdout] | [INFO] [stdout] 6760 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 6761 | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `expr: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:6805:54 [INFO] [stdout] | [INFO] [stdout] 6805 | if table_name_lower != *order_tbl && alias.as_ref().map_or(true, |a| a != order_tbl) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 6805 - if table_name_lower != *order_tbl && alias.as_ref().map_or(true, |a| a != order_tbl) [INFO] [stdout] 6805 + if table_name_lower != *order_tbl && (alias.as_ref() != Some(order_tbl)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/select/mod.rs:6987:53 [INFO] [stdout] | [INFO] [stdout] 6987 | fn resolve_order_by_aliases(&self, expr: &Expr, base_reg: i32, count: usize) -> Expr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_base_reg` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/select/mod.rs:7006:68 [INFO] [stdout] | [INFO] [stdout] 7006 | left: Box::new(self.resolve_order_by_aliases(left, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 7007 | right: Box::new(self.resolve_order_by_aliases(right, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7011 | expr: Box::new(self.resolve_order_by_aliases(inner, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7014 | self.resolve_order_by_aliases(inner, base_reg, count), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7023 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7027 | when: Box::new(self.resolve_order_by_aliases(&wc.when, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 7028 | then: Box::new(self.resolve_order_by_aliases(&wc.then, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7033 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7041 | .map(|e| self.resolve_order_by_aliases(e, base_reg, count)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/select/mod.rs:6987:68 [INFO] [stdout] | [INFO] [stdout] 6987 | fn resolve_order_by_aliases(&self, expr: &Expr, base_reg: i32, count: usize) -> Expr { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/select/mod.rs:7006:78 [INFO] [stdout] | [INFO] [stdout] 7006 | left: Box::new(self.resolve_order_by_aliases(left, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7007 | right: Box::new(self.resolve_order_by_aliases(right, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7011 | expr: Box::new(self.resolve_order_by_aliases(inner, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7014 | self.resolve_order_by_aliases(inner, base_reg, count), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7023 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7027 | when: Box::new(self.resolve_order_by_aliases(&wc.when, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7028 | then: Box::new(self.resolve_order_by_aliases(&wc.then, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7033 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7041 | .map(|e| self.resolve_order_by_aliases(e, base_reg, count)) [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/select/mod.rs:7417:10 [INFO] [stdout] | [INFO] [stdout] 7417 | ) -> (Option<(Expr, bool)>, Option<(Expr, bool)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/select/mod.rs:8589:17 [INFO] [stdout] | [INFO] [stdout] 8589 | / if let Some(alias_name) = alias { [INFO] [stdout] 8590 | | let alias_lower = alias_name.to_lowercase(); [INFO] [stdout] ... | [INFO] [stdout] 8601 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:8588:47 [INFO] [stdout] | [INFO] [stdout] 8588 | if let ResultColumn::Expr { expr, alias } = col { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 8589 | if let Some(alias_name) = alias { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern, prefixed by `alias: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:8922:33 [INFO] [stdout] | [INFO] [stdout] 8922 | / ... t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8923 | | ... st.columns [INFO] [stdout] 8924 | | ... .iter() [INFO] [stdout] 8925 | | ... .any(|c| c.name.eq_ignore_ascii_case(&col.column)) [INFO] [stdout] 8926 | | ... }) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 8922 - t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8922 + t.schema_table.as_ref().is_some_and(|st| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:8962:33 [INFO] [stdout] | [INFO] [stdout] 8962 | / ... t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8963 | | ... st.columns [INFO] [stdout] 8964 | | ... .iter() [INFO] [stdout] 8965 | | ... .any(|c| c.name.eq_ignore_ascii_case(&col.column)) [INFO] [stdout] 8966 | | ... }) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 8962 - t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8962 + t.schema_table.as_ref().is_some_and(|st| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/select/mod.rs:8890:41 [INFO] [stdout] | [INFO] [stdout] 8890 | fn expr_to_name(&self, expr: &Expr, index: usize) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/select/mod.rs:8894:75 [INFO] [stdout] | [INFO] [stdout] 8894 | Expr::Collate { expr: inner, .. } => self.expr_to_name(inner, index), [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [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/executor/select/mod.rs:9520:13 [INFO] [stdout] | [INFO] [stdout] 9520 | / match left.as_ref() { [INFO] [stdout] 9521 | | Expr::Column(col) => { [INFO] [stdout] 9522 | | if let Some(ref table_name) = col.table { [INFO] [stdout] 9523 | | if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] ... | [INFO] [stdout] 9534 | | _ => {} [INFO] [stdout] 9535 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 9520 ~ if let Expr::Column(col) = left.as_ref() { [INFO] [stdout] 9521 + if let Some(ref table_name) = col.table { [INFO] [stdout] 9522 + if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9523 + return None; [INFO] [stdout] 9524 + } [INFO] [stdout] 9525 + } else if !col.column.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9526 + return None; [INFO] [stdout] 9527 + } [INFO] [stdout] 9528 + return Some(Fts3MatchFilter { [INFO] [stdout] 9529 + cursor: table.cursor, [INFO] [stdout] 9530 + pattern: (*pattern.clone()), [INFO] [stdout] 9531 + }); [INFO] [stdout] 9532 + } [INFO] [stdout] | [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/executor/select/mod.rs:9565:13 [INFO] [stdout] | [INFO] [stdout] 9565 | / match left.as_ref() { [INFO] [stdout] 9566 | | Expr::Column(col) => { [INFO] [stdout] 9567 | | if let Some(ref table_name) = col.table { [INFO] [stdout] 9568 | | if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] ... | [INFO] [stdout] 9579 | | _ => {} [INFO] [stdout] 9580 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 9565 ~ if let Expr::Column(col) = left.as_ref() { [INFO] [stdout] 9566 + if let Some(ref table_name) = col.table { [INFO] [stdout] 9567 + if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9568 + return None; [INFO] [stdout] 9569 + } [INFO] [stdout] 9570 + } else if !col.column.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9571 + return None; [INFO] [stdout] 9572 + } [INFO] [stdout] 9573 + return Some(Fts3MatchFilter { [INFO] [stdout] 9574 + cursor: table.cursor, [INFO] [stdout] 9575 + pattern: (*pattern.clone()), [INFO] [stdout] 9576 + }); [INFO] [stdout] 9577 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/select/mod.rs:9769:33 [INFO] [stdout] | [INFO] [stdout] 9769 | / ... if let Some(al) = alias { [INFO] [stdout] 9770 | | ... if al.to_lowercase() == col_lower { [INFO] [stdout] ... | [INFO] [stdout] 9777 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:9765:33 [INFO] [stdout] | [INFO] [stdout] 9765 | ... alias, [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] ... [INFO] [stdout] 9769 | ... if let Some(al) = alias { [INFO] [stdout] | ^^^^^^^^ with this pattern, prefixed by `alias: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/executor/select/mod.rs:10171:5 [INFO] [stdout] | [INFO] [stdout] 10171 | / fn compile_or_branch( [INFO] [stdout] 10172 | | &mut self, [INFO] [stdout] 10173 | | table_cursor: i32, [INFO] [stdout] 10174 | | branch: &OrBranch, [INFO] [stdout] ... | [INFO] [stdout] 10179 | | from_idx: usize, [INFO] [stdout] 10180 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/select/mod.rs:10848:69 [INFO] [stdout] | [INFO] [stdout] 10848 | let func_name = if *op == BinaryOp::JsonExtract { [INFO] [stdout] | _____________________________________________________________________^ [INFO] [stdout] 10849 | | "json_extract" [INFO] [stdout] 10850 | | } else { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/select/mod.rs:10850:28 [INFO] [stdout] | [INFO] [stdout] 10850 | } else { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 10851 | | "json_extract" // ->> is json_extract with implicit text conversion [INFO] [stdout] 10852 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/executor/select/mod.rs:10957:44 [INFO] [stdout] | [INFO] [stdout] 10957 | ... Some(p) if p >= 0.0 && p <= 1.0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/executor/select/mod.rs:11125:37 [INFO] [stdout] | [INFO] [stdout] 11125 | ... op.p5 = crate::vdbe::ops::cmp_flags::JUMPIFNULL as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate::vdbe::ops::cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/executor/select/mod.rs:12220:33 [INFO] [stdout] | [INFO] [stdout] 12220 | / ... if !self.group_column_regs.contains_key(&name_lower) { [INFO] [stdout] 12221 | | ... self.group_column_regs [INFO] [stdout] 12222 | | ... .insert(name_lower, base_reg + idx as i32); [INFO] [stdout] 12223 | | ... } [INFO] [stdout] | |_______________________^ help: try: `self.group_column_regs.entry(name_lower).or_insert(base_reg + idx as i32);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/select/mod.rs:12525:17 [INFO] [stdout] | [INFO] [stdout] 12525 | / if let Some(alias_name) = alias { [INFO] [stdout] 12526 | | if self.expr_has_aggregate(expr) { [INFO] [stdout] 12527 | | aliases.push(alias_name.to_lowercase()); [INFO] [stdout] 12528 | | } [INFO] [stdout] 12529 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:12524:47 [INFO] [stdout] | [INFO] [stdout] 12524 | if let ResultColumn::Expr { expr, alias } = col { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 12525 | if let Some(alias_name) = alias { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern, prefixed by `alias: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/executor/select/mod.rs:12643:42 [INFO] [stdout] | [INFO] [stdout] 12643 | fn find_aggregate_alias_in_aggregate<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 12646 | aliases: &'a [String], [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 12643 ~ fn find_aggregate_alias_in_aggregate( [INFO] [stdout] 12644 | &self, [INFO] [stdout] 12645 | expr: &Expr, [INFO] [stdout] 12646 ~ aliases: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/trigger.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | / let mut ops = Vec::new(); [INFO] [stdout] 94 | | ops.push(make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 95 | | ops.push(make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/trigger.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | / let mut ops = Vec::new(); [INFO] [stdout] 140 | | ops.push(make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 141 | | ops.push(make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/executor/trigger.rs:1778:25 [INFO] [stdout] | [INFO] [stdout] 1778 | / if matches!( [INFO] [stdout] 1779 | | op.opcode, [INFO] [stdout] 1780 | | Opcode::OpenRead [INFO] [stdout] 1781 | | | Opcode::OpenWrite [INFO] [stdout] ... | [INFO] [stdout] 1788 | | } [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] 1784 ~ ) [INFO] [stdout] 1785 ~ && op.p1 + 1 > max_cursor { [INFO] [stdout] 1786 | max_cursor = op.p1 + 1; [INFO] [stdout] 1787 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/executor/trigger.rs:1965:1 [INFO] [stdout] | [INFO] [stdout] 1965 | / pub fn generate_trigger_code( [INFO] [stdout] 1966 | | triggers: &[Arc], [INFO] [stdout] 1967 | | schema: Option<&Schema>, [INFO] [stdout] 1968 | | table_name: &str, [INFO] [stdout] ... | [INFO] [stdout] 1974 | | return_label: i32, [INFO] [stdout] 1975 | | ) -> Result> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/executor/trigger.rs:2021:22 [INFO] [stdout] | [INFO] [stdout] 2021 | *next_reg += (row_size * 2) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(row_size * 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/executor/trigger.rs:2045:39 [INFO] [stdout] | [INFO] [stdout] 2045 | let new_base = base_reg + row_size as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `row_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/update.rs:1799:53 [INFO] [stdout] | [INFO] [stdout] 1799 | / ... if let Expr::Column(col_ref) = expr { [INFO] [stdout] 1800 | | ... // Find column index [INFO] [stdout] 1801 | | ... table_def [INFO] [stdout] 1802 | | ... .columns [INFO] [stdout] ... | [INFO] [stdout] 1807 | | ... 0 [INFO] [stdout] 1808 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/update.rs:1795:53 [INFO] [stdout] | [INFO] [stdout] 1795 | ... expr, [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] ... [INFO] [stdout] 1799 | ... if let Expr::Column(col_ref) = expr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `expr: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/where_clause.rs:778:49 [INFO] [stdout] | [INFO] [stdout] 778 | fn split_where_expr(&mut self, expr: &Expr, depth: i32) -> Result<()> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/where_clause.rs:786:45 [INFO] [stdout] | [INFO] [stdout] 786 | self.split_where_expr(left, depth + 1)?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 787 | self.split_where_expr(right, depth + 1)?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:888:21 [INFO] [stdout] | [INFO] [stdout] 888 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:893:25 [INFO] [stdout] | [INFO] [stdout] 893 | let like_terms: Vec<( [INFO] [stdout] | _________________________^ [INFO] [stdout] 894 | | usize, [INFO] [stdout] 895 | | Box, [INFO] [stdout] 896 | | Box, [INFO] [stdout] ... | [INFO] [stdout] 900 | | u64, [INFO] [stdout] 901 | | )> = self [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:1065:21 [INFO] [stdout] | [INFO] [stdout] 1065 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:1227:21 [INFO] [stdout] | [INFO] [stdout] 1227 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:1298:21 [INFO] [stdout] | [INFO] [stdout] 1298 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/executor/where_clause.rs:1468:9 [INFO] [stdout] | [INFO] [stdout] 1468 | while let Some(ch) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for ch in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: checking if a string is ascii using iterators [INFO] [stdout] --> src/executor/where_clause.rs:1504:35 [INFO] [stdout] | [INFO] [stdout] 1504 | if !is_case_sensitive && !prefix.chars().all(|c| c.is_ascii()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prefix.is_ascii()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_character_iteration [INFO] [stdout] = note: `#[warn(clippy::needless_character_iteration)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/where_clause.rs:1768:25 [INFO] [stdout] | [INFO] [stdout] 1768 | / match list { [INFO] [stdout] 1769 | | crate::parser::ast::InList::Values(v) => v.len(), [INFO] [stdout] 1770 | | _ => 10, // Estimate for subqueries [INFO] [stdout] 1771 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/where_clause.rs:1767:58 [INFO] [stdout] | [INFO] [stdout] 1767 | let values_count = if let Expr::In { list, .. } = term.expr.as_ref() { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 1768 | match list { [INFO] [stdout] 1769 | crate::parser::ast::InList::Values(v) => v.len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `list: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2231:24 [INFO] [stdout] | [INFO] [stdout] 2231 | if best.as_ref().map_or(true, |b| cost < b.cost) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2231 - if best.as_ref().map_or(true, |b| cost < b.cost) { [INFO] [stdout] 2231 + if best.as_ref().is_none_or(|b| cost < b.cost) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2314:33 [INFO] [stdout] | [INFO] [stdout] 2314 | let alias_matches = table [INFO] [stdout] | _________________________________^ [INFO] [stdout] 2315 | | .alias [INFO] [stdout] 2316 | | .as_ref() [INFO] [stdout] 2317 | | .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2317 - .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] 2317 + .is_some_and(|a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2329:17 [INFO] [stdout] | [INFO] [stdout] 2329 | / table [INFO] [stdout] 2330 | | .columns [INFO] [stdout] 2331 | | .get(table.ipk_column as usize) [INFO] [stdout] 2332 | | .map_or(false, |c| c.to_lowercase() == col_name_lower) [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2332 - .map_or(false, |c| c.to_lowercase() == col_name_lower) [INFO] [stdout] 2332 + .is_some_and(|c| c.to_lowercase() == col_name_lower) [INFO] [stdout] | [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/executor/where_clause.rs:2351:9 [INFO] [stdout] | [INFO] [stdout] 2351 | / match Self::unwrap_parens(expr) { [INFO] [stdout] 2352 | | Expr::Binary { op, left, right } => { [INFO] [stdout] 2353 | | match op { [INFO] [stdout] 2354 | | BinaryOp::And => { [INFO] [stdout] ... | [INFO] [stdout] 2374 | | _ => {} [INFO] [stdout] 2375 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 2351 ~ if let Expr::Binary { op, left, right } = Self::unwrap_parens(expr) { [INFO] [stdout] 2352 + match op { [INFO] [stdout] 2353 + BinaryOp::And => { [INFO] [stdout] 2354 + // Recurse into AND branches [INFO] [stdout] 2355 + self.collect_equality_exprs(left, table_idx, results); [INFO] [stdout] 2356 + self.collect_equality_exprs(right, table_idx, results); [INFO] [stdout] 2357 + } [INFO] [stdout] 2358 + BinaryOp::Eq | BinaryOp::Is => { [INFO] [stdout] 2359 + // Check for column = value [INFO] [stdout] 2360 + if let Some((col_idx, value)) = [INFO] [stdout] 2361 + self.extract_column_eq(left, right, table_idx) [INFO] [stdout] 2362 + { [INFO] [stdout] 2363 + results.push((col_idx, value)); [INFO] [stdout] 2364 + } else if let Some((col_idx, value)) = [INFO] [stdout] 2365 + self.extract_column_eq(right, left, table_idx) [INFO] [stdout] 2366 + { [INFO] [stdout] 2367 + results.push((col_idx, value)); [INFO] [stdout] 2368 + } [INFO] [stdout] 2369 + } [INFO] [stdout] 2370 + _ => {} [INFO] [stdout] 2371 + } [INFO] [stdout] 2372 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2393:37 [INFO] [stdout] | [INFO] [stdout] 2393 | let alias_matches = table [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 2394 | | .alias [INFO] [stdout] 2395 | | .as_ref() [INFO] [stdout] 2396 | | .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | |_____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2396 - .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] 2396 + .is_some_and(|a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/where_expr.rs:248:17 [INFO] [stdout] | [INFO] [stdout] 248 | / if let JoinConstraint::On(expr) = constraint { [INFO] [stdout] 249 | | mask |= expr_usage(expr, tables); [INFO] [stdout] 250 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/where_expr.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | if let Some(constraint) = constraint { [INFO] [stdout] | ^^^^^^^^^^ replace this binding [INFO] [stdout] 248 | if let JoinConstraint::On(expr) = constraint { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `is_leaf` [INFO] [stdout] --> src/rtree.rs:757:49 [INFO] [stdout] | [INFO] [stdout] 757 | pub fn deserialize_node(&self, data: &[u8], is_leaf: bool) -> Result> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_is_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/fts5/expr.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | / loop { [INFO] [stdout] 93 | | let distance = match self.peek() { [INFO] [stdout] 94 | | Some(Fts5QueryToken::Near(distance)) => *distance, [INFO] [stdout] 95 | | _ => break, [INFO] [stdout] ... | [INFO] [stdout] 99 | | expr = Fts5Expr::Near(vec![expr, right], distance); [INFO] [stdout] 100 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ while let Some(Fts5QueryToken::Near(distance)) = self.peek() { [INFO] [stdout] 93 + let distance = *distance; [INFO] [stdout] 94 + .. [INFO] [stdout] 95 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fts5/index.rs:114:18 [INFO] [stdout] | [INFO] [stdout] 114 | let hi = (ioff as i64) & ((0x7fff_ffff_i64) << 32); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `ioff` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fts5/index.rs:115:19 [INFO] [stdout] | [INFO] [stdout] 115 | let lo = (ioff as i64 + (val as i64 - 2)) & 0x7fff_ffff; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `ioff` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Fts5Segment` [INFO] [stdout] --> src/fts5/index.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / pub fn new() -> Self { [INFO] [stdout] 396 | | Self { [INFO] [stdout] 397 | | terms: std::collections::BTreeMap::new(), [INFO] [stdout] 398 | | } [INFO] [stdout] 399 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 394 + impl Default for Fts5Segment { [INFO] [stdout] 395 + fn default() -> Self { [INFO] [stdout] 396 + Self::new() [INFO] [stdout] 397 + } [INFO] [stdout] 398 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/fts5/index.rs:593:5 [INFO] [stdout] | [INFO] [stdout] 593 | positions.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 593 - positions.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] 593 + positions.sort_by_key(|a| (a.column, a.offset)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/fts5/main.rs:302:21 [INFO] [stdout] | [INFO] [stdout] 302 | phrase_pos.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 302 - phrase_pos.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] 302 + phrase_pos.sort_by_key(|a| (a.column, a.offset)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `z.get(0)` [INFO] [stdout] --> src/fts5/porter.rs:6:14 [INFO] [stdout] | [INFO] [stdout] 6 | let x = *z.get(0).unwrap_or(&0); [INFO] [stdout] | ^^^^^^^^ help: try: `z.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 `z.get(0)` [INFO] [stdout] --> src/fts5/porter.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | let x = *z.get(0).unwrap_or(&0); [INFO] [stdout] | ^^^^^^^^ help: try: `z.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 `z.get(0)` [INFO] [stdout] --> src/fts5/porter.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | z.get(0).copied().unwrap_or(0) != 0 [INFO] [stdout] | ^^^^^^^^ help: try: `z.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: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:146:12 [INFO] [stdout] | [INFO] [stdout] 146 | if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 - if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] 146 + if c.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:149:16 [INFO] [stdout] | [INFO] [stdout] 149 | if (b'0'..=b'9').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 149 - if (b'0'..=b'9').contains(&c) { [INFO] [stdout] 149 + if c.is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/fts5/porter.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | if n_in < 3 || n_in >= 21 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(3..21).contains(&n_in)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:175:24 [INFO] [stdout] | [INFO] [stdout] 175 | let lower = if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 - let lower = if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] 175 + let lower = if c.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:177:19 [INFO] [stdout] | [INFO] [stdout] 177 | } else if (b'a'..=b'z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - } else if (b'a'..=b'z').contains(&c) { [INFO] [stdout] 177 + } else if c.is_ascii_lowercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/fts5/porter.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | / if z[z_start] == b's' { [INFO] [stdout] 191 | | if !stem(z, &mut z_start, b"sess", b"ss", None) [INFO] [stdout] 192 | | && !stem(z, &mut z_start, b"sei", b"i", None) [INFO] [stdout] 193 | | && !stem(z, &mut z_start, b"ss", b"ss", None) [INFO] [stdout] ... | [INFO] [stdout] 197 | | } [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] 190 ~ if z[z_start] == b's' [INFO] [stdout] 191 ~ && !stem(z, &mut z_start, b"sess", b"ss", None) [INFO] [stdout] 192 | && !stem(z, &mut z_start, b"sei", b"i", None) [INFO] [stdout] ... [INFO] [stdout] 195 | z_start += 1; [INFO] [stdout] 196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:229:13 [INFO] [stdout] | [INFO] [stdout] 229 | / if !stem(z, &mut z_start, b"lanoita", b"ate", Some(m_gt_0)) { [INFO] [stdout] 230 | | stem(z, &mut z_start, b"lanoit", b"tion", Some(m_gt_0)); [INFO] [stdout] 231 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 228 ~ b'a' [INFO] [stdout] 229 ~ if !stem(z, &mut z_start, b"lanoita", b"ate", Some(m_gt_0)) => { [INFO] [stdout] 230 | stem(z, &mut z_start, b"lanoit", b"tion", Some(m_gt_0)); [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:234:13 [INFO] [stdout] | [INFO] [stdout] 234 | / if !stem(z, &mut z_start, b"icne", b"ence", Some(m_gt_0)) { [INFO] [stdout] 235 | | stem(z, &mut z_start, b"icna", b"ance", Some(m_gt_0)); [INFO] [stdout] 236 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 233 ~ b'c' [INFO] [stdout] 234 ~ if !stem(z, &mut z_start, b"icne", b"ence", Some(m_gt_0)) => { [INFO] [stdout] 235 | stem(z, &mut z_start, b"icna", b"ance", Some(m_gt_0)); [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / if !stem(z, &mut z_start, b"ilb", b"ble", Some(m_gt_0)) [INFO] [stdout] 246 | | && !stem(z, &mut z_start, b"illa", b"al", Some(m_gt_0)) [INFO] [stdout] 247 | | && !stem(z, &mut z_start, b"iltne", b"ent", Some(m_gt_0)) [INFO] [stdout] 248 | | && !stem(z, &mut z_start, b"ile", b"e", Some(m_gt_0)) [INFO] [stdout] 249 | | { [INFO] [stdout] 250 | | stem(z, &mut z_start, b"ilsuo", b"ous", Some(m_gt_0)); [INFO] [stdout] 251 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 244 ~ b'l' [INFO] [stdout] 245 | if !stem(z, &mut z_start, b"ilb", b"ble", Some(m_gt_0)) [INFO] [stdout] ... [INFO] [stdout] 248 | && !stem(z, &mut z_start, b"ile", b"e", Some(m_gt_0)) [INFO] [stdout] 249 ~ => { [INFO] [stdout] 250 | stem(z, &mut z_start, b"ilsuo", b"ous", Some(m_gt_0)); [INFO] [stdout] 251 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:254:13 [INFO] [stdout] | [INFO] [stdout] 254 | / if !stem(z, &mut z_start, b"noitazi", b"ize", Some(m_gt_0)) [INFO] [stdout] 255 | | && !stem(z, &mut z_start, b"noita", b"ate", Some(m_gt_0)) [INFO] [stdout] 256 | | { [INFO] [stdout] 257 | | stem(z, &mut z_start, b"rota", b"ate", Some(m_gt_0)); [INFO] [stdout] 258 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 253 ~ b'o' [INFO] [stdout] 254 | if !stem(z, &mut z_start, b"noitazi", b"ize", Some(m_gt_0)) [INFO] [stdout] 255 | && !stem(z, &mut z_start, b"noita", b"ate", Some(m_gt_0)) [INFO] [stdout] 256 ~ => { [INFO] [stdout] 257 | stem(z, &mut z_start, b"rota", b"ate", Some(m_gt_0)); [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | / if !stem(z, &mut z_start, b"msila", b"al", Some(m_gt_0)) [INFO] [stdout] 262 | | && !stem(z, &mut z_start, b"ssenevi", b"ive", Some(m_gt_0)) [INFO] [stdout] 263 | | && !stem(z, &mut z_start, b"ssenluf", b"ful", Some(m_gt_0)) [INFO] [stdout] ... | [INFO] [stdout] 266 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ b's' [INFO] [stdout] 261 | if !stem(z, &mut z_start, b"msila", b"al", Some(m_gt_0)) [INFO] [stdout] 262 | && !stem(z, &mut z_start, b"ssenevi", b"ive", Some(m_gt_0)) [INFO] [stdout] 263 | && !stem(z, &mut z_start, b"ssenluf", b"ful", Some(m_gt_0)) [INFO] [stdout] 264 ~ => { [INFO] [stdout] 265 | stem(z, &mut z_start, b"ssensuo", b"ous", Some(m_gt_0)); [INFO] [stdout] 266 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:269:13 [INFO] [stdout] | [INFO] [stdout] 269 | / if !stem(z, &mut z_start, b"itila", b"al", Some(m_gt_0)) [INFO] [stdout] 270 | | && !stem(z, &mut z_start, b"itivi", b"ive", Some(m_gt_0)) [INFO] [stdout] 271 | | { [INFO] [stdout] 272 | | stem(z, &mut z_start, b"itilib", b"ble", Some(m_gt_0)); [INFO] [stdout] 273 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 268 ~ b't' [INFO] [stdout] 269 | if !stem(z, &mut z_start, b"itila", b"al", Some(m_gt_0)) [INFO] [stdout] 270 | && !stem(z, &mut z_start, b"itivi", b"ive", Some(m_gt_0)) [INFO] [stdout] 271 ~ => { [INFO] [stdout] 272 | stem(z, &mut z_start, b"itilib", b"ble", Some(m_gt_0)); [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | / if !stem(z, &mut z_start, b"etaci", b"ic", Some(m_gt_0)) [INFO] [stdout] 281 | | && !stem(z, &mut z_start, b"evita", b"", Some(m_gt_0)) [INFO] [stdout] 282 | | { [INFO] [stdout] 283 | | stem(z, &mut z_start, b"ezila", b"al", Some(m_gt_0)); [INFO] [stdout] 284 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 279 ~ b'e' [INFO] [stdout] 280 | if !stem(z, &mut z_start, b"etaci", b"ic", Some(m_gt_0)) [INFO] [stdout] 281 | && !stem(z, &mut z_start, b"evita", b"", Some(m_gt_0)) [INFO] [stdout] 282 ~ => { [INFO] [stdout] 283 | stem(z, &mut z_start, b"ezila", b"al", Some(m_gt_0)); [INFO] [stdout] 284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:290:13 [INFO] [stdout] | [INFO] [stdout] 290 | / if !stem(z, &mut z_start, b"laci", b"ic", Some(m_gt_0)) { [INFO] [stdout] 291 | | stem(z, &mut z_start, b"luf", b"", Some(m_gt_0)); [INFO] [stdout] 292 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 289 ~ b'l' [INFO] [stdout] 290 ~ if !stem(z, &mut z_start, b"laci", b"ic", Some(m_gt_0)) => { [INFO] [stdout] 291 | stem(z, &mut z_start, b"luf", b"", Some(m_gt_0)); [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | / if z.get(z_start).copied().unwrap_or(0) == b'l' && m_gt_1(&z[z_start + 2..]) { [INFO] [stdout] 303 | | z_start += 2; [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 301 ~ b'a' [INFO] [stdout] 302 ~ if z.get(z_start).copied().unwrap_or(0) == b'l' && m_gt_1(&z[z_start + 2..]) => { [INFO] [stdout] 303 | z_start += 2; [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | / if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 308 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'n' [INFO] [stdout] 309 | | && (z.get(z_start + 3).copied().unwrap_or(0) == b'a' [INFO] [stdout] 310 | | || z.get(z_start + 3).copied().unwrap_or(0) == b'e') [INFO] [stdout] ... | [INFO] [stdout] 313 | | z_start += 4; [INFO] [stdout] 314 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ b'c' [INFO] [stdout] 307 | if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] ... [INFO] [stdout] 311 | && m_gt_1(&z[z_start + 4..]) [INFO] [stdout] 312 ~ => { [INFO] [stdout] 313 | z_start += 4; [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:317:13 [INFO] [stdout] | [INFO] [stdout] 317 | / if z.get(z_start).copied().unwrap_or(0) == b'r' && m_gt_1(&z[z_start + 2..]) { [INFO] [stdout] 318 | | z_start += 2; [INFO] [stdout] 319 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 316 ~ b'e' [INFO] [stdout] 317 ~ if z.get(z_start).copied().unwrap_or(0) == b'r' && m_gt_1(&z[z_start + 2..]) => { [INFO] [stdout] 318 | z_start += 2; [INFO] [stdout] 319 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:322:13 [INFO] [stdout] | [INFO] [stdout] 322 | / if z.get(z_start).copied().unwrap_or(0) == b'c' && m_gt_1(&z[z_start + 2..]) { [INFO] [stdout] 323 | | z_start += 2; [INFO] [stdout] 324 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 321 ~ b'i' [INFO] [stdout] 322 ~ if z.get(z_start).copied().unwrap_or(0) == b'c' && m_gt_1(&z[z_start + 2..]) => { [INFO] [stdout] 323 | z_start += 2; [INFO] [stdout] 324 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | / if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 328 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'b' [INFO] [stdout] 329 | | && (z.get(z_start + 3).copied().unwrap_or(0) == b'a' [INFO] [stdout] 330 | | || z.get(z_start + 3).copied().unwrap_or(0) == b'i') [INFO] [stdout] ... | [INFO] [stdout] 333 | | z_start += 4; [INFO] [stdout] 334 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 326 ~ b'l' [INFO] [stdout] 327 | if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] ... [INFO] [stdout] 331 | && m_gt_1(&z[z_start + 4..]) [INFO] [stdout] 332 ~ => { [INFO] [stdout] 333 | z_start += 4; [INFO] [stdout] 334 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:337:13 [INFO] [stdout] | [INFO] [stdout] 337 | / if z.get(z_start).copied().unwrap_or(0) == b't' { [INFO] [stdout] 338 | | if z.get(z_start + 2).copied().unwrap_or(0) == b'a' { [INFO] [stdout] 339 | | if m_gt_1(&z[z_start + 3..]) { [INFO] [stdout] 340 | | z_start += 3; [INFO] [stdout] ... | [INFO] [stdout] 349 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 336 ~ b'n' [INFO] [stdout] 337 ~ if z.get(z_start).copied().unwrap_or(0) == b't' => { [INFO] [stdout] 338 | if z.get(z_start + 2).copied().unwrap_or(0) == b'a' { [INFO] [stdout] ... [INFO] [stdout] 348 | } [INFO] [stdout] 349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if z.get(z_start).copied().unwrap_or(0) == b'm' [INFO] [stdout] 364 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 365 | | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] ... | [INFO] [stdout] 368 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 362 ~ b's' [INFO] [stdout] 363 | if z.get(z_start).copied().unwrap_or(0) == b'm' [INFO] [stdout] 364 | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 365 | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] 366 ~ => { [INFO] [stdout] 367 | z_start += 3; [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:371:13 [INFO] [stdout] | [INFO] [stdout] 371 | / if !stem(z, &mut z_start, b"eta", b"", Some(m_gt_1)) { [INFO] [stdout] 372 | | stem(z, &mut z_start, b"iti", b"", Some(m_gt_1)); [INFO] [stdout] 373 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 370 ~ b't' [INFO] [stdout] 371 ~ if !stem(z, &mut z_start, b"eta", b"", Some(m_gt_1)) => { [INFO] [stdout] 372 | stem(z, &mut z_start, b"iti", b"", Some(m_gt_1)); [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:376:13 [INFO] [stdout] | [INFO] [stdout] 376 | / if z.get(z_start).copied().unwrap_or(0) == b's' [INFO] [stdout] 377 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'o' [INFO] [stdout] 378 | | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] ... | [INFO] [stdout] 381 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ b'u' [INFO] [stdout] 376 | if z.get(z_start).copied().unwrap_or(0) == b's' [INFO] [stdout] 377 | && z.get(z_start + 2).copied().unwrap_or(0) == b'o' [INFO] [stdout] 378 | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] 379 ~ => { [INFO] [stdout] 380 | z_start += 3; [INFO] [stdout] 381 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | / if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 385 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 386 | | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 383 ~ b'v' | b'z' [INFO] [stdout] 384 | if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 385 | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 386 | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] 387 ~ => { [INFO] [stdout] 388 | z_start += 3; [INFO] [stdout] 389 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/fts5/porter.rs:342:24 [INFO] [stdout] | [INFO] [stdout] 342 | } else if z.get(z_start + 2).copied().unwrap_or(0) == b'e' { [INFO] [stdout] | ________________________^ [INFO] [stdout] 343 | | if !stem(z, &mut z_start, b"tneme", b"", Some(m_gt_1)) [INFO] [stdout] 344 | | && !stem(z, &mut z_start, b"tnem", b"", Some(m_gt_1)) [INFO] [stdout] ... | [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 342 ~ } else if z.get(z_start + 2).copied().unwrap_or(0) == b'e' [INFO] [stdout] 343 ~ && !stem(z, &mut z_start, b"tneme", b"", Some(m_gt_1)) [INFO] [stdout] 344 | && !stem(z, &mut z_start, b"tnem", b"", Some(m_gt_1)) [INFO] [stdout] 345 | { [INFO] [stdout] 346 | stem(z, &mut z_start, b"tne", b"", Some(m_gt_1)); [INFO] [stdout] 347 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/fts5/porter.rs:395:38 [INFO] [stdout] | [INFO] [stdout] 395 | if m_gt_1(&z[z_start + 1..]) { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 396 | | z_start += 1; [INFO] [stdout] 397 | | } else if m_eq_1(&z[z_start + 1..]) && !star_oh(&z[z_start + 1..]) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/fts5/porter.rs:397:76 [INFO] [stdout] | [INFO] [stdout] 397 | } else if m_eq_1(&z[z_start + 1..]) && !star_oh(&z[z_start + 1..]) { [INFO] [stdout] | ____________________________________________________________________________^ [INFO] [stdout] 398 | | z_start += 1; [INFO] [stdout] 399 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/tokenizer.rs:170:24 [INFO] [stdout] | [INFO] [stdout] 170 | if (b'A'..=b'Z').contains(byte) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 - if (b'A'..=b'Z').contains(byte) { [INFO] [stdout] 170 + if byte.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PorterTokenizer` [INFO] [stdout] --> src/fts5/tokenizer.rs:329:5 [INFO] [stdout] | [INFO] [stdout] 329 | / pub fn new() -> Self { [INFO] [stdout] 330 | | Self { [INFO] [stdout] 331 | | base: Unicode61Tokenizer { [INFO] [stdout] 332 | | remove_diacritics: 1, [INFO] [stdout] ... | [INFO] [stdout] 337 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 328 + impl Default for PorterTokenizer { [INFO] [stdout] 329 + fn default() -> Self { [INFO] [stdout] 330 + Self::new() [INFO] [stdout] 331 + } [INFO] [stdout] 332 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/fts5/unicode.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | if c < 768 || c > 817 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `!(768..=817).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/fts5/unicode.rs:1014:27 [INFO] [stdout] | [INFO] [stdout] 1014 | ret = ((c + AI_OFF[(flag >> 1) as usize] as i32) & 0x0000ffff) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((c + AI_OFF[(flag >> 1) as usize] as i32) & 0x0000ffff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/fts5/unicode.rs:1021:15 [INFO] [stdout] | [INFO] [stdout] 1021 | } else if c >= 66560 && c < 66600 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(66560..66600).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_rowid` after checking its variant with `is_some` [INFO] [stdout] --> src/fts5/vtab_adapter.rs:182:25 [INFO] [stdout] | [INFO] [stdout] 180 | if rowid.is_none() && new_rowid.is_some() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 181 | // INSERT [INFO] [stdout] 182 | let rowid = new_rowid.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/fts5/vtab_adapter.rs:301:6 [INFO] [stdout] | [INFO] [stdout] 301 | ) -> Result<(Vec, String, Vec, bool, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:593:22 [INFO] [stdout] | [INFO] [stdout] 593 | fn to_julian_day(&mut self) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:598:24 [INFO] [stdout] | [INFO] [stdout] 598 | fn to_unix_seconds(&mut self) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:716:21 [INFO] [stdout] | [INFO] [stdout] 716 | fn to_localtime(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:752:15 [INFO] [stdout] | [INFO] [stdout] 752 | fn to_utc(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bytes` [INFO] [stdout] --> src/functions/datetime.rs:804:14 [INFO] [stdout] | [INFO] [stdout] 804 | for i in start..start + count { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 804 - for i in start..start + count { [INFO] [stdout] 804 + for in bytes.iter().skip(start).take(count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> src/functions/fts5.rs:182:15 [INFO] [stdout] | [INFO] [stdout] 182 | let col = args.get(0).map(value_to_i64).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.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 `args.get(0)` [INFO] [stdout] --> src/functions/fts5.rs:235:15 [INFO] [stdout] | [INFO] [stdout] 235 | let col = args.get(0).map(value_to_i64).unwrap_or(-1); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.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: stripping a prefix manually [INFO] [stdout] --> src/functions/json.rs:411:40 [INFO] [stdout] | [INFO] [stdout] 411 | if let Ok(n) = idx_s[2..].parse::() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/json.rs:409:24 [INFO] [stdout] | [INFO] [stdout] 409 | } else if idx_s.starts_with("#-") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 409 ~ } else if let Some() = idx_s.strip_prefix("#-") { [INFO] [stdout] 410 | if let JsonValue::Array(arr) = current { [INFO] [stdout] 411 ~ if let Ok(n) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/functions/json.rs:821:8 [INFO] [stdout] | [INFO] [stdout] 821 | if args.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!args.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/functions/json.rs:889:26 [INFO] [stdout] | [INFO] [stdout] 889 | if args.len() < 3 || (args.len() - 1) % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!(args.len() - 1).is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/functions/json.rs:892:13 [INFO] [stdout] | [INFO] [stdout] 892 | &format!("wrong number of arguments to function {}()", name), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("wrong number of arguments to function {}()", name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/functions/json.rs:1000:8 [INFO] [stdout] | [INFO] [stdout] 1000 | if args.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!args.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/printf.rs:354:33 [INFO] [stdout] | [INFO] [stdout] 354 | if let Some(e_pos) = s.find(|c| c == 'e' || c == 'E') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['e', 'E']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/printf.rs:360:19 [INFO] [stdout] | [INFO] [stdout] 360 | ("-", &rest[1..]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/printf.rs:359:30 [INFO] [stdout] | [INFO] [stdout] 359 | let (sign, digits) = if rest.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 359 ~ let (sign, digits) = if let Some() = rest.strip_prefix('-') { [INFO] [stdout] 360 ~ ("-", ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/printf.rs:362:19 [INFO] [stdout] | [INFO] [stdout] 362 | ("+", &rest[1..]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/printf.rs:361:16 [INFO] [stdout] | [INFO] [stdout] 361 | } else if rest.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 361 ~ } else if let Some() = rest.strip_prefix('+') { [INFO] [stdout] 362 ~ ("+", ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/printf.rs:428:33 [INFO] [stdout] | [INFO] [stdout] 428 | if let Some(e_pos) = s.find(|c| c == 'e' || c == 'E') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['e', 'E']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/functions/printf.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | &trimmed[..trimmed.len() - 1] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/functions/printf.rs:431:23 [INFO] [stdout] | [INFO] [stdout] 431 | let trimmed = if trimmed.ends_with('.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 431 ~ let trimmed = if let Some() = trimmed.strip_suffix('.') { [INFO] [stdout] 432 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/functions/printf.rs:446:13 [INFO] [stdout] | [INFO] [stdout] 446 | trimmed[..trimmed.len() - 1].to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/functions/printf.rs:445:9 [INFO] [stdout] | [INFO] [stdout] 445 | if trimmed.ends_with('.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 445 ~ if let Some() = trimmed.strip_suffix('.') { [INFO] [stdout] 446 ~ .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/functions/scalar.rs:727:8 [INFO] [stdout] | [INFO] [stdout] 727 | if x < -1.0 || x > 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-1.0..=1.0).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/functions/scalar.rs:745:8 [INFO] [stdout] | [INFO] [stdout] 745 | if x < -1.0 || x > 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-1.0..=1.0).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/functions/scalar.rs:2293:17 [INFO] [stdout] | [INFO] [stdout] 2293 | / if node_id != 1 { [INFO] [stdout] 2294 | | if table.get_parent(node_id).is_none() { [INFO] [stdout] 2295 | | errors.push(format!("node {} has no parent", node_id)); [INFO] [stdout] 2296 | | } [INFO] [stdout] 2297 | | } [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] 2293 ~ if node_id != 1 [INFO] [stdout] 2294 ~ && table.get_parent(node_id).is_none() { [INFO] [stdout] 2295 | errors.push(format!("node {} has no parent", node_id)); [INFO] [stdout] 2296 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `root_limits` [INFO] [stdout] --> src/storage/btree/mod.rs:4396:33 [INFO] [stdout] | [INFO] [stdout] 4396 | let (root_mem_page, root_limits) = _cursor.load_page(&mut shared_guard, root_pgno)?; [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_root_limits` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/scalar.rs:2624:20 [INFO] [stdout] | [INFO] [stdout] 2624 | (true, &s[1..]) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/scalar.rs:2623:32 [INFO] [stdout] | [INFO] [stdout] 2623 | let (is_negative, s) = if s.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 2623 ~ let (is_negative, s) = if let Some() = s.strip_prefix('-') { [INFO] [stdout] 2624 ~ (true, ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/scalar.rs:2626:21 [INFO] [stdout] | [INFO] [stdout] 2626 | (false, &s[1..]) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/scalar.rs:2625:16 [INFO] [stdout] | [INFO] [stdout] 2625 | } else if s.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 2625 ~ } else if let Some() = s.strip_prefix('+') { [INFO] [stdout] 2626 ~ (false, ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/scalar.rs:2630:57 [INFO] [stdout] | [INFO] [stdout] 2630 | let (mantissa, exp) = if let Some(pos) = s.find(|c: char| c == 'e' || c == 'E') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['e', 'E']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/scalar.rs:3005:64 [INFO] [stdout] | [INFO] [stdout] 3005 | let (date_part, time_part) = if let Some(pos) = s.find(|c: char| c == ' ' || c == 'T') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[' ', 'T']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/scalar.rs:3178:19 [INFO] [stdout] | [INFO] [stdout] 3178 | .find(|c: char| c == '(' || c == ' ' || c == '\n' || c == '\r' || c == '\t') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', ' ', '\n', '\r', '\t']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7170:13 [INFO] [stdout] | [INFO] [stdout] 7170 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7191:13 [INFO] [stdout] | [INFO] [stdout] 7191 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7212:13 [INFO] [stdout] | [INFO] [stdout] 7212 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7229:13 [INFO] [stdout] | [INFO] [stdout] 7229 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7262:13 [INFO] [stdout] | [INFO] [stdout] 7262 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7299:13 [INFO] [stdout] | [INFO] [stdout] 7299 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7366:13 [INFO] [stdout] | [INFO] [stdout] 7366 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7437:13 [INFO] [stdout] | [INFO] [stdout] 7437 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7460:13 [INFO] [stdout] | [INFO] [stdout] 7460 | let mut btree = Arc::try_unwrap(btree_arc).ok().unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7834:13 [INFO] [stdout] | [INFO] [stdout] 7834 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7859:13 [INFO] [stdout] | [INFO] [stdout] 7859 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/btree/mod.rs:7886:13 [INFO] [stdout] | [INFO] [stdout] 7886 | let mut btree = unwrap_arc(btree); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `offset2` [INFO] [stdout] --> src/storage/btree/mod.rs:8159:13 [INFO] [stdout] | [INFO] [stdout] 8159 | let offset2 = page.allocate_space(100, limits).unwrap(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_offset2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `offset1` [INFO] [stdout] --> src/storage/btree/mod.rs:8220:13 [INFO] [stdout] | [INFO] [stdout] 8220 | let offset1 = page.allocate_space(100, limits).unwrap(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_offset1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:1606:13 [INFO] [stdout] | [INFO] [stdout] 1606 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:1749:13 [INFO] [stdout] | [INFO] [stdout] 1749 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:1885:13 [INFO] [stdout] | [INFO] [stdout] 1885 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:1977:13 [INFO] [stdout] | [INFO] [stdout] 1977 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:2188:13 [INFO] [stdout] | [INFO] [stdout] 2188 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:2504:13 [INFO] [stdout] | [INFO] [stdout] 2504 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:2716:13 [INFO] [stdout] | [INFO] [stdout] 2716 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:3063:13 [INFO] [stdout] | [INFO] [stdout] 3063 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:3267:13 [INFO] [stdout] | [INFO] [stdout] 3267 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:3655:13 [INFO] [stdout] | [INFO] [stdout] 3655 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/wal.rs:3940:13 [INFO] [stdout] | [INFO] [stdout] 3940 | let mut wal = Wal::open(&get_test_db_path(), 4096).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser/grammar.rs:1117:56 [INFO] [stdout] | [INFO] [stdout] 1117 | let alias = if self.match_token(TokenKind::As) { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 1118 | | Some(self.expect_identifier()?) [INFO] [stdout] 1119 | | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser/grammar.rs:1119:88 [INFO] [stdout] | [INFO] [stdout] 1119 | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 1120 | | Some(self.expect_identifier()?) [INFO] [stdout] 1121 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser/grammar.rs:1213:56 [INFO] [stdout] | [INFO] [stdout] 1213 | let alias = if self.match_token(TokenKind::As) { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 1214 | | Some(self.expect_identifier()?) [INFO] [stdout] 1215 | | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser/grammar.rs:1215:88 [INFO] [stdout] | [INFO] [stdout] 1215 | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 1216 | | Some(self.expect_identifier()?) [INFO] [stdout] 1217 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/grammar.rs:2046:17 [INFO] [stdout] | [INFO] [stdout] 2046 | / ... if insert.table.schema.is_some() { [INFO] [stdout] 2047 | | ... return Err(Error::with_message( [INFO] [stdout] 2048 | | ... ErrorCode::Error, [INFO] [stdout] 2049 | | ... "qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers".to_string(), [INFO] [stdout] 2050 | | ... )); [INFO] [stdout] 2051 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2044 ~ Stmt::Insert(insert) [INFO] [stdout] 2045 | // Qualified table names not allowed [INFO] [stdout] 2046 ~ if insert.table.schema.is_some() => { [INFO] [stdout] 2047 | return Err(Error::with_message( [INFO] [stdout] ... [INFO] [stdout] 2050 | )); [INFO] [stdout] 2051 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser/grammar.rs:2144:59 [INFO] [stdout] | [INFO] [stdout] 2144 | } else if self.match_token(TokenKind::Column) { [INFO] [stdout] | ___________________________________________________________^ [INFO] [stdout] 2145 | | let old = self.expect_identifier()?; [INFO] [stdout] 2146 | | self.expect(TokenKind::To)?; [INFO] [stdout] 2147 | | let new = self.expect_identifier()?; [INFO] [stdout] 2148 | | AlterTableAction::RenameColumn { old, new } [INFO] [stdout] 2149 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser/grammar.rs:2149:20 [INFO] [stdout] | [INFO] [stdout] 2149 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2150 | | let old = self.expect_identifier()?; [INFO] [stdout] 2151 | | self.expect(TokenKind::To)?; [INFO] [stdout] 2152 | | let new = self.expect_identifier()?; [INFO] [stdout] 2153 | | AlterTableAction::RenameColumn { old, new } [INFO] [stdout] 2154 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/parser/grammar.rs:2984:20 [INFO] [stdout] | [INFO] [stdout] 2984 | if hex.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `!hex.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/grammar.rs:3426:21 [INFO] [stdout] | [INFO] [stdout] 3426 | / if depth == 0 { [INFO] [stdout] 3427 | | break; [INFO] [stdout] 3428 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3425 ~ TokenKind::Semicolon | TokenKind::Eof [INFO] [stdout] 3426 ~ if depth == 0 => { [INFO] [stdout] 3427 | break; [INFO] [stdout] 3428 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/parser/resolve.rs:401:9 [INFO] [stdout] | [INFO] [stdout] 401 | ctes: &HashMap, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_ctes` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/parser/resolve.rs:410:55 [INFO] [stdout] | [INFO] [stdout] 410 | self.resolve_table_ref(left, sources, ctes)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] 411 | self.resolve_table_ref(right, sources, ctes)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 420 | self.resolve_table_ref(inner, sources, ctes)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolve.rs:578:21 [INFO] [stdout] | [INFO] [stdout] 578 | / if *idx > 0 { [INFO] [stdout] 579 | | replacement = result_column_expr(result_columns, *idx as usize - 1); [INFO] [stdout] 580 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 577 ~ Expr::Literal(Literal::Integer(idx)) [INFO] [stdout] 578 ~ if *idx > 0 => { [INFO] [stdout] 579 | replacement = result_column_expr(result_columns, *idx as usize - 1); [INFO] [stdout] 580 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolve.rs:583:21 [INFO] [stdout] | [INFO] [stdout] 583 | / if col_ref.table.is_none() { [INFO] [stdout] 584 | | if let Some((_, expr)) = entries [INFO] [stdout] 585 | | .iter() [INFO] [stdout] 586 | | .find(|(name, _)| name.eq_ignore_ascii_case(&col_ref.column)) [INFO] [stdout] ... | [INFO] [stdout] 590 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 582 ~ Expr::Column(col_ref) [INFO] [stdout] 583 ~ if col_ref.table.is_none() => { [INFO] [stdout] 584 | if let Some((_, expr)) = entries [INFO] [stdout] ... [INFO] [stdout] 589 | } [INFO] [stdout] 590 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `seed` [INFO] [stdout] --> src/random.rs:129:18 [INFO] [stdout] | [INFO] [stdout] 129 | for i in 0..256 { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 129 - for i in 0..256 { [INFO] [stdout] 129 + for (i, ) in seed.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `point` [INFO] [stdout] --> src/rtree.rs:255:26 [INFO] [stdout] | [INFO] [stdout] 255 | for i in 0..self.n_dim { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 255 - for i in 0..self.n_dim { [INFO] [stdout] 255 + for (i, ) in point.iter().enumerate().take(self.n_dim) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/rtree.rs:523:9 [INFO] [stdout] | [INFO] [stdout] 523 | / loop { [INFO] [stdout] 524 | | let parent_id = match self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 525 | | Some(id) => id, [INFO] [stdout] 526 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 537 | | node_id = parent_id; [INFO] [stdout] 538 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 523 ~ while let Some(id) = self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 524 + let parent_id = id; [INFO] [stdout] 525 + .. [INFO] [stdout] 526 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/rtree.rs:546:9 [INFO] [stdout] | [INFO] [stdout] 546 | / loop { [INFO] [stdout] 547 | | let parent_id = match self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 548 | | Some(id) => id, [INFO] [stdout] 549 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 572 | | node_id = parent_id; [INFO] [stdout] 573 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 546 ~ while let Some(id) = self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 547 + let parent_id = id; [INFO] [stdout] 548 + .. [INFO] [stdout] 549 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/vdbe/engine/mod.rs:8554:13 [INFO] [stdout] | [INFO] [stdout] 3322 | Opcode::Count => { [INFO] [stdout] | ------------- matches all the relevant values [INFO] [stdout] ... [INFO] [stdout] 8554 | Opcode::Count => { [INFO] [stdout] | ^^^^^^^^^^^^^ no value can reach this [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_rowid` after checking its variant with `is_some` [INFO] [stdout] --> src/rtree_vtab.rs:394:25 [INFO] [stdout] | [INFO] [stdout] 392 | if rowid.is_none() && new_rowid.is_some() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 393 | // INSERT [INFO] [stdout] 394 | let rowid = new_rowid.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/rtree_vtab.rs:637:8 [INFO] [stdout] | [INFO] [stdout] 637 | if columns.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!columns.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `columns` [INFO] [stdout] --> src/rtree_vtab.rs:652:14 [INFO] [stdout] | [INFO] [stdout] 652 | for i in 1..columns.len() { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 652 - for i in 1..columns.len() { [INFO] [stdout] 652 + for in columns.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/schema/mod.rs:679:38 [INFO] [stdout] | [INFO] [stdout] 679 | if let Some(end_quote) = after_default[1..].find('\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/schema/mod.rs:677:9 [INFO] [stdout] | [INFO] [stdout] 677 | if after_default.starts_with('\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 677 ~ if let Some() = after_default.strip_prefix('\'') { [INFO] [stdout] 678 | // String literal [INFO] [stdout] 679 ~ if let Some(end_quote) = .find('\'') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/schema/mod.rs:968:17 [INFO] [stdout] | [INFO] [stdout] 968 | / if let crate::parser::ast::ResultColumn::Expr { expr, .. } = first_col { [INFO] [stdout] 969 | | return Some(ast_expr_to_schema_expr(expr)); [INFO] [stdout] 970 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/schema/mod.rs:967:25 [INFO] [stdout] | [INFO] [stdout] 967 | if let Some(first_col) = body.columns.first() { [INFO] [stdout] | ^^^^^^^^^ replace this binding [INFO] [stdout] 968 | if let crate::parser::ast::ResultColumn::Expr { expr, .. } = first_col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/schema/mod.rs:1332:67 [INFO] [stdout] | [INFO] [stdout] 1332 | let default_value = extract_default_value(&col_def_upper, &col_def); [INFO] [stdout] | ^^^^^^^^ help: change this to: `col_def` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/schema/mod.rs:1362:50 [INFO] [stdout] | [INFO] [stdout] 1362 | let generated = extract_generated_column(&col_def, &col_def_upper); [INFO] [stdout] | ^^^^^^^^ help: change this to: `col_def` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/schema/mod.rs:1400:42 [INFO] [stdout] | [INFO] [stdout] 1400 | for (_col_idx, col) in columns.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1400 - for (_col_idx, col) in columns.iter().enumerate() { [INFO] [stdout] 1400 + for col in columns.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/schema/mod.rs:1715:9 [INFO] [stdout] | [INFO] [stdout] 1715 | &s[1..s.len() - 1].trim() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `s[1..s.len() - 1].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/schema/mod.rs:1844:1 [INFO] [stdout] | [INFO] [stdout] 1844 | / pub enum TriggerStep { [INFO] [stdout] 1845 | | Insert { [INFO] [stdout] 1846 | | table: String, [INFO] [stdout] 1847 | | columns: Option>, [INFO] [stdout] ... | [INFO] [stdout] 1850 | |/ Update { [INFO] [stdout] 1851 | || table: String, [INFO] [stdout] 1852 | || assignments: Vec<(String, Expr)>, [INFO] [stdout] 1853 | || where_clause: Option, [INFO] [stdout] 1854 | || }, [INFO] [stdout] | ||_____- the second-largest variant contains at least 104 bytes [INFO] [stdout] ... | [INFO] [stdout] 1859 | | Select(Select), [INFO] [stdout] | | -------------- the largest variant contains at least 328 bytes [INFO] [stdout] 1860 | | } [INFO] [stdout] | |__^ the entire enum is at least 328 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1859 - Select(Select), [INFO] [stdout] 1859 + Select(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/schema/mod.rs:2531:24 [INFO] [stdout] | [INFO] [stdout] 2531 | && table.columns.get(pk_indices[0]).map_or(false, |c| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 2532 | | c.affinity == Affinity::Integer [INFO] [stdout] 2533 | | && c.type_name [INFO] [stdout] 2534 | | .as_ref() [INFO] [stdout] 2535 | | .map(|t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 2536 | | .unwrap_or(false) [INFO] [stdout] 2537 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2531 - && table.columns.get(pk_indices[0]).map_or(false, |c| { [INFO] [stdout] 2531 + && table.columns.get(pk_indices[0]).is_some_and(|c| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/schema/mod.rs:2951:21 [INFO] [stdout] | [INFO] [stdout] 2951 | / if *storage == GeneratedStorage::Stored { [INFO] [stdout] 2952 | | has_stored_generated = true; [INFO] [stdout] 2953 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2950 ~ ColumnConstraint::Generated { storage, .. } [INFO] [stdout] 2951 ~ if *storage == GeneratedStorage::Stored => { [INFO] [stdout] 2952 | has_stored_generated = true; [INFO] [stdout] 2953 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/vdbe/engine/mod.rs:5067:37 [INFO] [stdout] | [INFO] [stdout] 5067 | ... let mut text = None; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/vdbe/engine/mod.rs:5846:25 [INFO] [stdout] | [INFO] [stdout] 5846 | let mut skip_final_insert = false; [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `index_table_name` is assigned to, but never used [INFO] [stdout] --> src/vdbe/engine/mod.rs:2216:25 [INFO] [stdout] | [INFO] [stdout] 2216 | let mut index_table_name: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_index_table_name` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:3099:25 [INFO] [stdout] | [INFO] [stdout] 3099 | let btree = self.btree.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:3396:21 [INFO] [stdout] | [INFO] [stdout] 3396 | let btree = self.btree.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5057:33 [INFO] [stdout] | [INFO] [stdout] 5057 | ... let btree = self.btree.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `schema` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5058:33 [INFO] [stdout] | [INFO] [stdout] 5058 | ... let schema = self.schema.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_schema` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vtab_name` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5068:46 [INFO] [stdout] | [INFO] [stdout] 5068 | ... if let (Some(vtab_name), Some(rowid)) = [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_vtab_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rowid` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5068:63 [INFO] [stdout] | [INFO] [stdout] 5068 | ... if let (Some(vtab_name), Some(rowid)) = [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_rowid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:5374:21 [INFO] [stdout] | [INFO] [stdout] 5374 | let btree = btree_arc.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:6125:21 [INFO] [stdout] | [INFO] [stdout] 6125 | let btree = btree_arc.clone(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `schema` [INFO] [stdout] --> src/vdbe/engine/mod.rs:6126:21 [INFO] [stdout] | [INFO] [stdout] 6126 | let schema = self.schema.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_schema` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `btree` [INFO] [stdout] --> src/vdbe/engine/mod.rs:6292:37 [INFO] [stdout] | [INFO] [stdout] 6292 | if let Some(ref btree) = btree_arc { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_btree` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2270:45 [INFO] [stdout] | [INFO] [stdout] 2270 | ... index_table_name = Some(index.table.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2290:53 [INFO] [stdout] | [INFO] [stdout] 2290 | ... index_table_name = Some(idx.table.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2348:57 [INFO] [stdout] | [INFO] [stdout] 2348 | ... index_table_name = [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `index_table_name` is never read [INFO] [stdout] --> src/vdbe/engine/mod.rs:2370:65 [INFO] [stdout] | [INFO] [stdout] 2370 | ... index_table_name = [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/btree/types.rs:177:14 [INFO] [stdout] | [INFO] [stdout] 177 | cmp: Arc std::cmp::Ordering + Send + Sync>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/storage/btree/types.rs:209:1 [INFO] [stdout] | [INFO] [stdout] 209 | / impl Default for CollSeq { [INFO] [stdout] 210 | | fn default() -> Self { [INFO] [stdout] 211 | | CollSeq::Binary [INFO] [stdout] 212 | | } [INFO] [stdout] 213 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 167 + #[derive(Default)] [INFO] [stdout] 168 | pub enum CollSeq { [INFO] [stdout] 169 | /// Binary comparison (memcmp, default) [INFO] [stdout] 170 ~ #[default] [INFO] [stdout] 171 ~ Binary, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/storage/btree/types.rs:221:21 [INFO] [stdout] | [INFO] [stdout] 221 | let al = if (b'A'..=b'Z').contains(&ac) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 221 - let al = if (b'A'..=b'Z').contains(&ac) { [INFO] [stdout] 221 + let al = if ac.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/storage/btree/types.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | let bl = if (b'A'..=b'Z').contains(&bc) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 226 - let bl = if (b'A'..=b'Z').contains(&bc) { [INFO] [stdout] 226 + let bl = if bc.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/storage/btree/mod.rs:1466:5 [INFO] [stdout] | [INFO] [stdout] 1466 | (pg_minus_2 % group_size) == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `pg_minus_2.is_multiple_of(group_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/btree/mod.rs:1907:63 [INFO] [stdout] | [INFO] [stdout] 1907 | fn split_leaf_cells(limits: PageLimits, cells: &[Vec]) -> Result<(Vec>, Vec>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/storage/btree/mod.rs:1932:27 [INFO] [stdout] | [INFO] [stdout] 1932 | let balance = if left_used > right_used { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 1933 | | left_used - right_used [INFO] [stdout] 1934 | | } else { [INFO] [stdout] 1935 | | right_used - left_used [INFO] [stdout] 1936 | | }; [INFO] [stdout] | |_____________^ help: replace with `abs_diff`: `left_used.abs_diff(right_used)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] = note: `#[warn(clippy::manual_abs_diff)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/storage/btree/mod.rs:2239:1 [INFO] [stdout] | [INFO] [stdout] 2239 | / fn merge_leaf_with_sibling( [INFO] [stdout] 2240 | | shared: &mut BtShared, [INFO] [stdout] 2241 | | parent: &MemPage, [INFO] [stdout] 2242 | | parent_limits: PageLimits, [INFO] [stdout] ... | [INFO] [stdout] 2247 | | cursor_ix: u16, [INFO] [stdout] 2248 | | ) -> Result { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/storage/btree/mod.rs:2848:5 [INFO] [stdout] | [INFO] [stdout] 2848 | info.n_key = n_key as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `storage::btree::CellInfo { n_key: n_key as i64, n_payload: payload_size, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/storage/btree/mod.rs:2847:5 [INFO] [stdout] | [INFO] [stdout] 2847 | let mut info = CellInfo::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/storage/btree/mod.rs:2978:1 [INFO] [stdout] | [INFO] [stdout] 2978 | / fn split_leaf_with_parent( [INFO] [stdout] 2979 | | shared: &mut BtShared, [INFO] [stdout] 2980 | | parent: &MemPage, [INFO] [stdout] 2981 | | parent_limits: PageLimits, [INFO] [stdout] ... | [INFO] [stdout] 2987 | | new_cell: Vec, [INFO] [stdout] 2988 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/storage/btree/mod.rs:3333:54 [INFO] [stdout] | [INFO] [stdout] 3333 | let (payload_size, n1) = if self.is_zerodata { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 3334 | | let (payload, bytes) = read_varint32(&self.data, cursor)?; [INFO] [stdout] 3335 | | (payload, bytes) [INFO] [stdout] 3336 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/storage/btree/mod.rs:3336:16 [INFO] [stdout] | [INFO] [stdout] 3336 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 3337 | | let (payload, bytes) = read_varint32(&self.data, cursor)?; [INFO] [stdout] 3338 | | (payload, bytes) [INFO] [stdout] 3339 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/storage/btree/mod.rs:3517:34 [INFO] [stdout] | [INFO] [stdout] 3517 | let cell_content_start = self.cell_content_offset(limits).ok()? as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.cell_content_offset(limits).ok()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:3847:27 [INFO] [stdout] | [INFO] [stdout] 3847 | return Ok(Arc::new(Btree { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 3848 | | db, [INFO] [stdout] 3849 | | shared, [INFO] [stdout] 3850 | | in_trans: AtomicU8::new(TransState::None as u8), [INFO] [stdout] ... | [INFO] [stdout] 3858 | | prev: None, [INFO] [stdout] 3859 | | })); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:3978:22 [INFO] [stdout] | [INFO] [stdout] 3978 | let shared = Arc::new(RwLock::new(shared)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>` is not `Send` and `Sync` as `RwLock` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RwLock` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:3983:12 [INFO] [stdout] | [INFO] [stdout] 3983 | Ok(Arc::new(Btree { [INFO] [stdout] | ____________^ [INFO] [stdout] 3984 | | db, [INFO] [stdout] 3985 | | shared, [INFO] [stdout] 3986 | | in_trans: AtomicU8::new(TransState::None as u8), [INFO] [stdout] ... | [INFO] [stdout] 3994 | | prev: None, [INFO] [stdout] 3995 | | })) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/storage/btree/mod.rs:4428:52 [INFO] [stdout] | [INFO] [stdout] 4428 | if _cursor.state != CursorState::Valid { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 4429 | | need_seek = true; [INFO] [stdout] 4430 | | } else if _cursor.cursor_data_version != shared_guard.shared_data_version { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/storage/btree/mod.rs:4430:87 [INFO] [stdout] | [INFO] [stdout] 4430 | } else if _cursor.cursor_data_version != shared_guard.shared_data_version { [INFO] [stdout] | _______________________________________________________________________________________^ [INFO] [stdout] 4431 | | need_seek = true; [INFO] [stdout] 4432 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `storage::btree::types::BtTableLockEntry` is more private than the item `storage::btree::BtShared::table_locks` [INFO] [stdout] --> src/storage/btree/mod.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | pub table_locks: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `storage::btree::BtShared::table_locks` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `storage::btree::types::BtTableLockEntry` is only usable at visibility `pub(crate)` [INFO] [stdout] --> src/storage/btree/types.rs:323:1 [INFO] [stdout] | [INFO] [stdout] 323 | pub(crate) struct BtTableLockEntry { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.wal` after checking its variant with `is_some` [INFO] [stdout] --> src/storage/pager.rs:857:39 [INFO] [stdout] | [INFO] [stdout] 854 | if self.wal.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = &self.wal` [INFO] [stdout] ... [INFO] [stdout] 857 | let wal = self.wal.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.wal` after checking its variant with `is_some` [INFO] [stdout] --> src/storage/pager.rs:898:27 [INFO] [stdout] | [INFO] [stdout] 896 | if self.wal.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = &self.wal` [INFO] [stdout] 897 | let frame = { [INFO] [stdout] 898 | let wal = self.wal.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `cache_page_ref.data.get(0)` [INFO] [stdout] --> src/storage/pager.rs:847:25 [INFO] [stdout] | [INFO] [stdout] 847 | cache_page_ref.data.get(0).copied().unwrap_or(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cache_page_ref.data.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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/api/config.rs:381:17 [INFO] [stdout] | [INFO] [stdout] 381 | assert!(ts >= 0 && ts <= 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(0..=2).contains(&ts)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/storage/pcache.rs:388:9 [INFO] [stdout] | [INFO] [stdout] 388 | / if self.purgeable && self.n_page >= self.n_max { [INFO] [stdout] 389 | | if self.evict_lru().is_none() { [INFO] [stdout] ... | [INFO] [stdout] 394 | | } [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] 388 ~ if self.purgeable && self.n_page >= self.n_max [INFO] [stdout] 389 ~ && self.evict_lru().is_none() { [INFO] [stdout] 390 | // Eviction failed (all pages pinned) - respect cache limit [INFO] [stdout] 391 | // Return None to signal cache is full [INFO] [stdout] 392 | return None; [INFO] [stdout] 393 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/storage/pcache.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / if self.evict_lru().is_none() { [INFO] [stdout] 390 | | // Eviction failed (all pages pinned) - respect cache limit [INFO] [stdout] 391 | | // Return None to signal cache is full [INFO] [stdout] 392 | | return None; [INFO] [stdout] 393 | | } [INFO] [stdout] | |_____________^ help: replace it with: `self.evict_lru()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api/connection.rs:701:21 [INFO] [stdout] | [INFO] [stdout] 701 | pub collations: HashMap std::cmp::Ordering + Send + Sync>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api/connection.rs:937:10 [INFO] [stdout] | [INFO] [stdout] 937 | ) -> Option std::cmp::Ordering + Send + Sync>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.dbs.get(0)` [INFO] [stdout] --> src/api/connection.rs:1014:36 [INFO] [stdout] | [INFO] [stdout] 1014 | if let Some(main_schema) = self.dbs.get(0).and_then(|db| db.schema.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.dbs.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: accessing first element with `self.dbs.get(0)` [INFO] [stdout] --> src/api/connection.rs:1399:36 [INFO] [stdout] | [INFO] [stdout] 1399 | if let Some(main_schema) = self.dbs.get(0).and_then(|db| db.schema.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.dbs.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 pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1451:22 [INFO] [stdout] | [INFO] [stdout] 1451 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 1451 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1451 + if let (Some(btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1451:39 [INFO] [stdout] | [INFO] [stdout] 1451 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1451 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1451 + if let (Some(ref btree), Some(schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1468:22 [INFO] [stdout] | [INFO] [stdout] 1468 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1468 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1468 + if let (Some(btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1468:39 [INFO] [stdout] | [INFO] [stdout] 1468 | if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1468 - if let (Some(ref btree), Some(ref schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] 1468 + if let (Some(ref btree), Some(schema)) = (btree.as_ref(), schema_arc.as_ref()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1555:30 [INFO] [stdout] | [INFO] [stdout] 1555 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1555 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1555 + if let (Some(btree), Some(ref schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1555:47 [INFO] [stdout] | [INFO] [stdout] 1555 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1555 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1555 + if let (Some(ref btree), Some(schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1568:30 [INFO] [stdout] | [INFO] [stdout] 1568 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1568 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1568 + if let (Some(btree), Some(ref schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/api/connection.rs:1568:47 [INFO] [stdout] | [INFO] [stdout] 1568 | if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1568 - if let (Some(ref btree), Some(ref schema)) = [INFO] [stdout] 1568 + if let (Some(ref btree), Some(schema)) = [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1613:24 [INFO] [stdout] | [INFO] [stdout] 1613 | let obj_type = values.get(0).map(Mem::to_str).unwrap_or_default(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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 `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1715:38 [INFO] [stdout] | [INFO] [stdout] 1715 | let nodeno = values.get(0).map(|m| m.to_int()).unwrap_or(key); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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 `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1737:37 [INFO] [stdout] | [INFO] [stdout] 1737 | let rowid = values.get(0).map(|m| m.to_int()).unwrap_or(key); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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 `values.get(0)` [INFO] [stdout] --> src/api/connection.rs:1759:38 [INFO] [stdout] | [INFO] [stdout] 1759 | let nodeno = values.get(0).map(|m| m.to_int()).unwrap_or(key); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `values.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` has identical blocks [INFO] [stdout] --> src/api/connection.rs:1877:60 [INFO] [stdout] | [INFO] [stdout] 1877 | } else if parts[i].eq_ignore_ascii_case("ASC") { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 1878 | | i += 1; [INFO] [stdout] 1879 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/api/connection.rs:1879:20 [INFO] [stdout] | [INFO] [stdout] 1879 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 1880 | | i += 1; [INFO] [stdout] 1881 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/api/session.rs:45:19 [INFO] [stdout] | [INFO] [stdout] 45 | table_filter: Option bool + Send + Sync>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/api/session.rs:381:5 [INFO] [stdout] | [INFO] [stdout] 381 | / pub fn next(&mut self) -> Result> { [INFO] [stdout] 382 | | loop { [INFO] [stdout] 383 | | if self.pos >= self.data.len() { [INFO] [stdout] 384 | | return Ok(None); [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `bind_idx` is used as a loop counter [INFO] [stdout] --> src/api/session.rs:930:5 [INFO] [stdout] | [INFO] [stdout] 930 | for (idx, _) in pk_cols { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (bind_idx, (idx, _)) in (1..).zip(pk_cols.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: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/api/session.rs:1712:5 [INFO] [stdout] | [INFO] [stdout] 1712 | / pub fn next(&mut self) -> Result> { [INFO] [stdout] 1713 | | loop { [INFO] [stdout] 1714 | | // Ensure we have at least some data [INFO] [stdout] 1715 | | if !self.fill_buffer(1)? { [INFO] [stdout] ... | [INFO] [stdout] 1786 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/api/session.rs:1912:5 [INFO] [stdout] | [INFO] [stdout] 1912 | / loop { [INFO] [stdout] 1913 | | match sqlite3_step(&mut stmt)? { [INFO] [stdout] 1914 | | StepResult::Row => { [INFO] [stdout] 1915 | | let mut values = Vec::with_capacity(n_col as usize); [INFO] [stdout] ... | [INFO] [stdout] 1923 | | } [INFO] [stdout] | |_____^ help: try: `while let StepResult::Row = sqlite3_step(&mut stmt)? { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/api/session.rs:1932:5 [INFO] [stdout] | [INFO] [stdout] 1932 | / loop { [INFO] [stdout] 1933 | | match sqlite3_step(&mut stmt)? { [INFO] [stdout] 1934 | | StepResult::Row => { [INFO] [stdout] 1935 | | let mut values = Vec::with_capacity(n_col as usize); [INFO] [stdout] ... | [INFO] [stdout] 1943 | | } [INFO] [stdout] | |_____^ help: try: `while let StepResult::Row = sqlite3_step(&mut stmt)? { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/api/session.rs:1984:9 [INFO] [stdout] | [INFO] [stdout] 1984 | / loop { [INFO] [stdout] 1985 | | match sqlite3_step(&mut stmt)? { [INFO] [stdout] 1986 | | StepResult::Row => { [INFO] [stdout] 1987 | | let mut new_values = Vec::with_capacity(n_col as usize); [INFO] [stdout] ... | [INFO] [stdout] 2004 | | } [INFO] [stdout] | |_________^ help: try: `while let StepResult::Row = sqlite3_step(&mut stmt)? { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/util/general.rs:422:22 [INFO] [stdout] | [INFO] [stdout] 422 | static LOG_CALLBACK: Mutex>> = Mutex::new(None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buf` [INFO] [stdout] --> src/vdbe/auxdata.rs:236:18 [INFO] [stdout] | [INFO] [stdout] 236 | for i in 1..9 { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 236 - for i in 1..9 { [INFO] [stdout] 236 + for (i, ) in buf.iter_mut().enumerate().take(9).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `serial_types` [INFO] [stdout] --> src/vdbe/auxdata.rs:327:14 [INFO] [stdout] | [INFO] [stdout] 327 | for i in 0..count { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 327 - for i in 0..count { [INFO] [stdout] 327 + for (i, ) in serial_types.iter().enumerate().take(count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/api/stmt.rs:932:13 [INFO] [stdout] | [INFO] [stdout] 932 | / if let Value::Text(pattern) = value { [INFO] [stdout] 933 | | // Check if pattern has a usable prefix (doesn't start with wildcard) [INFO] [stdout] 934 | | if let Some(first_char) = pattern.chars().next() { [INFO] [stdout] ... | [INFO] [stdout] 945 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/api/stmt.rs:931:21 [INFO] [stdout] | [INFO] [stdout] 931 | if let Some(value) = params.get((*param_idx - 1) as usize) { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 932 | if let Value::Text(pattern) = value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/api/stmt.rs:1013:9 [INFO] [stdout] | [INFO] [stdout] 1013 | &*main_schema_guard, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&main_schema_guard` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/vdbe/engine/handlers/arithmetic.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | / match ib.checked_sub(ia) { [INFO] [stdout] 126 | | Some(result) => { [INFO] [stdout] 127 | | ctx.mem_mut(op.p3).set_int(result); [INFO] [stdout] 128 | | return Ok(OpcodeResult::Continue); [INFO] [stdout] 129 | | } [INFO] [stdout] 130 | | None => {} [INFO] [stdout] 131 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 125 ~ if let Some(result) = ib.checked_sub(ia) { [INFO] [stdout] 126 + ctx.mem_mut(op.p3).set_int(result); [INFO] [stdout] 127 + return Ok(OpcodeResult::Continue); [INFO] [stdout] 128 + } [INFO] [stdout] | [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/vdbe/engine/handlers/arithmetic.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | / match ib.checked_mul(ia) { [INFO] [stdout] 169 | | Some(result) => { [INFO] [stdout] 170 | | ctx.mem_mut(op.p3).set_int(result); [INFO] [stdout] 171 | | return Ok(OpcodeResult::Continue); [INFO] [stdout] 172 | | } [INFO] [stdout] 173 | | None => {} [INFO] [stdout] 174 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 168 ~ if let Some(result) = ib.checked_mul(ia) { [INFO] [stdout] 169 + ctx.mem_mut(op.p3).set_int(result); [INFO] [stdout] 170 + return Ok(OpcodeResult::Continue); [INFO] [stdout] 171 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:46:31 [INFO] [stdout] | [INFO] [stdout] 46 | let nulleq = (op.p5 & cmp_flags::NULLEQ as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::NULLEQ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:47:32 [INFO] [stdout] | [INFO] [stdout] 47 | let affinity = op.p5 & cmp_flags::AFFINITY_MASK as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::AFFINITY_MASK` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:82:31 [INFO] [stdout] | [INFO] [stdout] 82 | let nulleq = (op.p5 & cmp_flags::NULLEQ as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::NULLEQ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | let jumpifnull = (op.p5 & cmp_flags::JUMPIFNULL as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:84:32 [INFO] [stdout] | [INFO] [stdout] 84 | let affinity = op.p5 & cmp_flags::AFFINITY_MASK as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::AFFINITY_MASK` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | let jumpifnull = (op.p5 & cmp_flags::JUMPIFNULL as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:130:32 [INFO] [stdout] | [INFO] [stdout] 130 | let affinity = op.p5 & cmp_flags::AFFINITY_MASK as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::AFFINITY_MASK` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:167:35 [INFO] [stdout] | [INFO] [stdout] 167 | let jumpifnull = (op.p5 & cmp_flags::JUMPIFNULL as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:168:32 [INFO] [stdout] | [INFO] [stdout] 168 | let affinity = op.p5 & cmp_flags::AFFINITY_MASK as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::AFFINITY_MASK` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:205:35 [INFO] [stdout] | [INFO] [stdout] 205 | let jumpifnull = (op.p5 & cmp_flags::JUMPIFNULL as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:206:32 [INFO] [stdout] | [INFO] [stdout] 206 | let affinity = op.p5 & cmp_flags::AFFINITY_MASK as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::AFFINITY_MASK` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:243:35 [INFO] [stdout] | [INFO] [stdout] 243 | let jumpifnull = (op.p5 & cmp_flags::JUMPIFNULL as u16) != 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/vdbe/engine/handlers/comparison.rs:244:32 [INFO] [stdout] | [INFO] [stdout] 244 | let affinity = op.p5 & cmp_flags::AFFINITY_MASK as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cmp_flags::AFFINITY_MASK` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vdbe/engine/mod.rs:296:25 [INFO] [stdout] | [INFO] [stdout] 296 | pub schema_entries: Option)>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/vdbe/engine/mod.rs:451:17 [INFO] [stdout] | [INFO] [stdout] 451 | / match bt_cursor.table_moveto(saved_rowid, false) { [INFO] [stdout] 452 | | Ok(res) => { [INFO] [stdout] 453 | | // res == 0 means exact match, -1 means cursor at entry > key, 1 means cursor at entry < key [INFO] [stdout] 454 | | if bt_cursor.state == crate::storage::btree::CursorState::Valid { [INFO] [stdout] ... | [INFO] [stdout] 467 | | Err(_) => {} [INFO] [stdout] 468 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 451 ~ if let Ok(res) = bt_cursor.table_moveto(saved_rowid, false) { [INFO] [stdout] 452 + // res == 0 means exact match, -1 means cursor at entry > key, 1 means cursor at entry < key [INFO] [stdout] 453 + if bt_cursor.state == crate::storage::btree::CursorState::Valid { [INFO] [stdout] 454 + self.state = CursorState::Valid; [INFO] [stdout] 455 + self.rowid = Some(bt_cursor.integer_key()); [INFO] [stdout] 456 + self.row_data = None; [INFO] [stdout] 457 + self.cached_columns = None; [INFO] [stdout] 458 + // If the row was deleted (res != 0), we're positioned at the next row [INFO] [stdout] 459 + // which is correct behavior for cursor stability [INFO] [stdout] 460 + return true; [INFO] [stdout] 461 + } else if res != 0 { [INFO] [stdout] 462 + // Seek landed outside table bounds, cursor is invalid [INFO] [stdout] 463 + // but this is expected if we deleted the last row [INFO] [stdout] 464 + } [INFO] [stdout] 465 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vdbe/engine/mod.rs:642:23 [INFO] [stdout] | [INFO] [stdout] 642 | subprogram_stack: Vec<(Vec, i32, i32, Option, i32)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/vdbe/engine/mod.rs:794:21 [INFO] [stdout] | [INFO] [stdout] 794 | / if (op.p5 & OPFLAG_NCHANGE) != 0 { [INFO] [stdout] 795 | | vdbe.is_dml_statement = true; [INFO] [stdout] 796 | | break; [INFO] [stdout] 797 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 793 ~ Opcode::Insert | Opcode::Delete [INFO] [stdout] 794 ~ if (op.p5 & OPFLAG_NCHANGE) != 0 => { [INFO] [stdout] 795 | vdbe.is_dml_statement = true; [INFO] [stdout] 796 | break; [INFO] [stdout] 797 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/vdbe/engine/mod.rs:998:9 [INFO] [stdout] | [INFO] [stdout] 998 | / let Some(conn_ptr) = self.conn_ptr else { [INFO] [stdout] 999 | | return None; [INFO] [stdout] 1000 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let conn_ptr = self.conn_ptr?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/vdbe/engine/mod.rs:1015:9 [INFO] [stdout] | [INFO] [stdout] 1015 | / let Some(conn_ptr) = self.conn_ptr else { [INFO] [stdout] 1016 | | return None; [INFO] [stdout] 1017 | | }; [INFO] [stdout] | |__________^ help: replace it with: `let conn_ptr = self.conn_ptr?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | col.name = format!("col{}", i); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: format!("col{}", i), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | let mut col = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vdbe/engine/mod.rs:1064:10 [INFO] [stdout] | [INFO] [stdout] 1064 | ) -> Result)>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/executor/column_mapping.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | / if matches!(source, ColumnSource::Null) { [INFO] [stdout] 154 | | if target_columns[target_idx].default_value.is_some() { [INFO] [stdout] 155 | | *source = ColumnSource::DefaultValue; [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [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] 153 ~ if matches!(source, ColumnSource::Null) [INFO] [stdout] 154 ~ && target_columns[target_idx].default_value.is_some() { [INFO] [stdout] 155 | *source = ColumnSource::DefaultValue; [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/column_mapping.rs:173:28 [INFO] [stdout] | [INFO] [stdout] 173 | let first_is_ipk = target_columns.first().map_or(false, |col| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 174 | | col.is_primary_key [INFO] [stdout] 175 | | && col [INFO] [stdout] 176 | | .type_name [INFO] [stdout] 177 | | .as_ref() [INFO] [stdout] 178 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 179 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 173 - let first_is_ipk = target_columns.first().map_or(false, |col| { [INFO] [stdout] 173 + let first_is_ipk = target_columns.first().is_some_and(|col| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/column_mapping.rs:175:20 [INFO] [stdout] | [INFO] [stdout] 175 | && col [INFO] [stdout] | ____________________^ [INFO] [stdout] 176 | | .type_name [INFO] [stdout] 177 | | .as_ref() [INFO] [stdout] 178 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 178 - .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 178 + .is_some_and(|t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/column_mapping.rs:184:20 [INFO] [stdout] | [INFO] [stdout] 184 | && col [INFO] [stdout] | ____________________^ [INFO] [stdout] 185 | | .type_name [INFO] [stdout] 186 | | .as_ref() [INFO] [stdout] 187 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")); [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 187 - .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")); [INFO] [stdout] 187 + .is_some_and(|t| t.eq_ignore_ascii_case("INTEGER")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/executor/column_mapping.rs:243:68 [INFO] [stdout] | [INFO] [stdout] 243 | .find(|(_, col)| col.name.to_lowercase() == name_lower) [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 244 | | .map(|(idx, col)| (idx, col)) [INFO] [stdout] | |_________________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | col_a.name = "a".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "a".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | let mut col_a = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:286:9 [INFO] [stdout] | [INFO] [stdout] 286 | col_b.name = "b".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "b".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | let mut col_b = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:300:9 [INFO] [stdout] | [INFO] [stdout] 300 | col_a.name = "a".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "a".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:299:9 [INFO] [stdout] | [INFO] [stdout] 299 | let mut col_a = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | col_b.name = "b".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "b".to_string(), default_value: Some(DefaultValue::String("default_b".to_string())), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | let mut col_b = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:317:9 [INFO] [stdout] | [INFO] [stdout] 317 | col_a.name = "a".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "a".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:316:9 [INFO] [stdout] | [INFO] [stdout] 316 | let mut col_a = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:320:9 [INFO] [stdout] | [INFO] [stdout] 320 | col_b.name = "b".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "b".to_string(), default_value: Some(DefaultValue::String("default_b".to_string())), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | let mut col_b = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | col_a.name = "a".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "a".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | let mut col_a = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | col_b.name = "b".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "b".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | let mut col_b = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/executor/column_mapping.rs:342:9 [INFO] [stdout] | [INFO] [stdout] 342 | col_c.name = "c".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `schema::Column { name: "c".to_string(), default_value: Some(DefaultValue::Integer(42)), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/executor/column_mapping.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | let mut col_c = Column::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_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/executor/delete.rs:897:17 [INFO] [stdout] | [INFO] [stdout] 897 | / match &func_call.args { [INFO] [stdout] 898 | | crate::parser::ast::FunctionArgs::Exprs(exprs) => { [INFO] [stdout] 899 | | for arg in exprs { [INFO] [stdout] 900 | | self.validate_expr_columns(arg)?; [INFO] [stdout] ... | [INFO] [stdout] 903 | | _ => {} [INFO] [stdout] 904 | | } [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] 897 ~ if let crate::parser::ast::FunctionArgs::Exprs(exprs) = &func_call.args { [INFO] [stdout] 898 + for arg in exprs { [INFO] [stdout] 899 + self.validate_expr_columns(arg)?; [INFO] [stdout] 900 + } [INFO] [stdout] 901 + } [INFO] [stdout] | [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/executor/delete.rs:917:17 [INFO] [stdout] | [INFO] [stdout] 917 | / match list { [INFO] [stdout] 918 | | crate::parser::ast::InList::Values(exprs) => { [INFO] [stdout] 919 | | for val_expr in exprs { [INFO] [stdout] 920 | | self.validate_expr_columns(val_expr)?; [INFO] [stdout] ... | [INFO] [stdout] 923 | | _ => {} [INFO] [stdout] 924 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 917 ~ if let crate::parser::ast::InList::Values(exprs) = list { [INFO] [stdout] 918 + for val_expr in exprs { [INFO] [stdout] 919 + self.validate_expr_columns(val_expr)?; [INFO] [stdout] 920 + } [INFO] [stdout] 921 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/vdbe/engine/mod.rs:1797:28 [INFO] [stdout] | [INFO] [stdout] 1797 | } else if nulleq { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 1798 | | if left.is_null() ^ right.is_null() { [INFO] [stdout] 1799 | | self.pc = op.p2; [INFO] [stdout] 1800 | | } [INFO] [stdout] 1801 | | } [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] 1797 ~ } else if nulleq [INFO] [stdout] 1798 ~ && left.is_null() ^ right.is_null() { [INFO] [stdout] 1799 | self.pc = op.p2; [INFO] [stdout] 1800 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/delete.rs:1337:88 [INFO] [stdout] | [INFO] [stdout] 1337 | if op.opcode == Opcode::OpenRead || op.opcode == Opcode::OpenWrite { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 1338 | | op.p1 += cursor_offset; [INFO] [stdout] 1339 | | } else if matches!( [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/delete.rs:1362:23 [INFO] [stdout] | [INFO] [stdout] 1362 | ) { [INFO] [stdout] | _______________________^ [INFO] [stdout] 1363 | | op.p1 += cursor_offset; [INFO] [stdout] 1364 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:2249:44 [INFO] [stdout] | [INFO] [stdout] 2249 | ... if requested_db_idx.map_or(true, |idx| table.db_idx == idx) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2249 - if requested_db_idx.map_or(true, |idx| table.db_idx == idx) [INFO] [stdout] 2249 + if requested_db_idx.is_none_or(|idx| table.db_idx == idx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:2265:44 [INFO] [stdout] | [INFO] [stdout] 2265 | ... if requested_db_idx.map_or(true, |idx| index.db_idx == idx) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2265 - if requested_db_idx.map_or(true, |idx| index.db_idx == idx) [INFO] [stdout] 2265 + if requested_db_idx.is_none_or(|idx| index.db_idx == idx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:2284:44 [INFO] [stdout] | [INFO] [stdout] 2284 | ... if requested_db_idx.map_or(true, |idx| tbl.db_idx == idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2284 - if requested_db_idx.map_or(true, |idx| tbl.db_idx == idx) { [INFO] [stdout] 2284 + if requested_db_idx.is_none_or(|idx| tbl.db_idx == idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/executor/delete.rs:1818:37 [INFO] [stdout] | [INFO] [stdout] 1818 | fn from_clause_references_table(&self, from: &crate::parser::ast::FromClause) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/executor/delete.rs:1862:17 [INFO] [stdout] | [INFO] [stdout] 1862 | / if self.select_references_table(select) { [INFO] [stdout] 1863 | | let idx = self.subquery_counter; [INFO] [stdout] 1864 | | self.subquery_counter += 1; [INFO] [stdout] 1865 | | result.push((idx, select)); [INFO] [stdout] 1866 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1861 ~ Expr::Subquery(select) [INFO] [stdout] 1862 ~ if self.select_references_table(select) => { [INFO] [stdout] 1863 | let idx = self.subquery_counter; [INFO] [stdout] 1864 | self.subquery_counter += 1; [INFO] [stdout] 1865 | result.push((idx, select)); [INFO] [stdout] 1866 ~ } [INFO] [stdout] | [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/vdbe/engine/mod.rs:2491:33 [INFO] [stdout] | [INFO] [stdout] 2491 | / ... match btree.cursor(root_page, flags, key_info) { [INFO] [stdout] 2492 | | ... Ok(mut bt_cursor) => { [INFO] [stdout] ... | [INFO] [stdout] 2498 | | ... Err(_) => {} // Failed to create cursor, use placeholder [INFO] [stdout] 2499 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2491 ~ if let Ok(mut bt_cursor) = btree.cursor(root_page, flags, key_info) { [INFO] [stdout] 2492 + // Set cur_int_key based on cursor type: [INFO] [stdout] 2493 + // Tables use intkey btrees, indexes use blobkey btrees [INFO] [stdout] 2494 + bt_cursor.cur_int_key = !is_index; [INFO] [stdout] 2495 + cursor.btree_cursor = Some(bt_cursor); [INFO] [stdout] 2496 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/delete.rs:1978:84 [INFO] [stdout] | [INFO] [stdout] 1978 | if op.opcode == Opcode::OpenRead || op.opcode == Opcode::OpenWrite { [INFO] [stdout] | ____________________________________________________________________________________^ [INFO] [stdout] 1979 | | op.p1 += cursor_offset; [INFO] [stdout] 1980 | | } else if matches!( [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/delete.rs:2003:19 [INFO] [stdout] | [INFO] [stdout] 2003 | ) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 2004 | | op.p1 += cursor_offset; [INFO] [stdout] 2005 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:2637:40 [INFO] [stdout] | [INFO] [stdout] 2637 | ... if requested_db_idx.map_or(true, |idx| table.db_idx == idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2637 - if requested_db_idx.map_or(true, |idx| table.db_idx == idx) { [INFO] [stdout] 2637 + if requested_db_idx.is_none_or(|idx| table.db_idx == idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:2652:40 [INFO] [stdout] | [INFO] [stdout] 2652 | ... if requested_db_idx.map_or(true, |idx| index.db_idx == idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2652 - if requested_db_idx.map_or(true, |idx| index.db_idx == idx) { [INFO] [stdout] 2652 + if requested_db_idx.is_none_or(|idx| index.db_idx == idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:2672:40 [INFO] [stdout] | [INFO] [stdout] 2672 | ... if requested_db_idx.map_or(true, |idx| tbl.db_idx == idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2672 - if requested_db_idx.map_or(true, |idx| tbl.db_idx == idx) { [INFO] [stdout] 2672 + if requested_db_idx.is_none_or(|idx| tbl.db_idx == idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `rowid` is used as a loop counter [INFO] [stdout] --> src/vdbe/engine/mod.rs:3479:29 [INFO] [stdout] | [INFO] [stdout] 3479 | ... for record in cursor.ephemeral_set.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (rowid, record) in (1_i64..).zip(cursor.ephemeral_set.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/executor/insert.rs:491:17 [INFO] [stdout] | [INFO] [stdout] 491 | / if i < row.len() { [INFO] [stdout] 492 | | if matches!(target, InsertColumnTarget::Rowid) { [INFO] [stdout] 493 | | has_explicit_rowid = true; [INFO] [stdout] 494 | | explicit_rowid_idx = i; [INFO] [stdout] ... | [INFO] [stdout] 497 | | } [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] 491 ~ if i < row.len() [INFO] [stdout] 492 ~ && matches!(target, InsertColumnTarget::Rowid) { [INFO] [stdout] 493 | has_explicit_rowid = true; [INFO] [stdout] 494 | explicit_rowid_idx = i; [INFO] [stdout] 495 | break; [INFO] [stdout] 496 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/vdbe/engine/mod.rs:4239:44 [INFO] [stdout] | [INFO] [stdout] 4239 | ... } else if let Ok(data) = [INFO] [stdout] | ______________________________^ [INFO] [stdout] 4240 | | ... bt_cursor.payload(0, bt_cursor.payload_size()) [INFO] [stdout] 4241 | | ... { [INFO] [stdout] 4242 | | ... Some(data) [INFO] [stdout] 4243 | | ... } else { [INFO] [stdout] 4244 | | ... None [INFO] [stdout] 4245 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] help: replace with [INFO] [stdout] | [INFO] [stdout] 4239 ~ } else { [INFO] [stdout] 4240 + bt_cursor.payload(0, bt_cursor.payload_size()).ok() [INFO] [stdout] 4241 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `types` [INFO] [stdout] --> src/vdbe/engine/mod.rs:4311:50 [INFO] [stdout] | [INFO] [stdout] 4311 | ... for i in 0..col_idx { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 4311 - for i in 0..col_idx { [INFO] [stdout] 4311 + for in types.iter().take(col_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `types` [INFO] [stdout] --> src/vdbe/engine/mod.rs:4354:46 [INFO] [stdout] | [INFO] [stdout] 4354 | ... for i in 0..col_idx { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 4354 - for i in 0..col_idx { [INFO] [stdout] 4354 + for in types.iter().take(col_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:4412:56 [INFO] [stdout] | [INFO] [stdout] 4412 | ... && col.type_name.as_ref().map_or(false, |t| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 4413 | | ... t.eq_ignore_ascii_case("INTEGER") [INFO] [stdout] 4414 | | ... }) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 4412 - && col.type_name.as_ref().map_or(false, |t| { [INFO] [stdout] 4412 + && col.type_name.as_ref().is_some_and(|t| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/executor/insert.rs:964:25 [INFO] [stdout] | [INFO] [stdout] 964 | .map(|cols| cols.iter().map(|c| c.clone()).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `cols.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/executor/insert.rs:1299:25 [INFO] [stdout] | [INFO] [stdout] 1299 | .map(|cols| cols.iter().map(|c| c.clone()).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `cols.iter().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/insert.rs:1454:17 [INFO] [stdout] | [INFO] [stdout] 1454 | / if let TableRef::Table { name, .. } = table_ref { [INFO] [stdout] 1455 | | return Ok(name.name.clone()); [INFO] [stdout] 1456 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/insert.rs:1453:25 [INFO] [stdout] | [INFO] [stdout] 1453 | if let Some(table_ref) = from.tables.first() { [INFO] [stdout] | ^^^^^^^^^ replace this binding [INFO] [stdout] 1454 | if let TableRef::Table { name, .. } = table_ref { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/executor/insert.rs:1833:45 [INFO] [stdout] | [INFO] [stdout] 1833 | SelectBody::Select(core) => !core.group_by.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core.group_by.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/insert.rs:2190:80 [INFO] [stdout] | [INFO] [stdout] 2190 | if op.opcode == Opcode::OpenRead || op.opcode == Opcode::OpenWrite { [INFO] [stdout] | ________________________________________________________________________________^ [INFO] [stdout] 2191 | | op.p1 += cursor_offset; [INFO] [stdout] 2192 | | } else if matches!( [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/insert.rs:2215:15 [INFO] [stdout] | [INFO] [stdout] 2215 | ) { [INFO] [stdout] | _______________^ [INFO] [stdout] 2216 | | op.p1 += cursor_offset; [INFO] [stdout] 2217 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/insert.rs:2777:34 [INFO] [stdout] | [INFO] [stdout] 2777 | let is_ipk = col.map_or(false, |c| { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 2778 | | c.is_primary_key [INFO] [stdout] 2779 | | && c.type_name [INFO] [stdout] 2780 | | .as_ref() [INFO] [stdout] 2781 | | .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 2782 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2777 - let is_ipk = col.map_or(false, |c| { [INFO] [stdout] 2777 + let is_ipk = col.is_some_and(|c| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/insert.rs:2779:32 [INFO] [stdout] | [INFO] [stdout] 2779 | ... && c.type_name [INFO] [stdout] | __________________________^ [INFO] [stdout] 2780 | | ... .as_ref() [INFO] [stdout] 2781 | | ... .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | |_______________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2781 - .map_or(false, |t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 2781 + .is_some_and(|t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ConflictAction` which implements the `Copy` trait [INFO] [stdout] --> src/executor/insert.rs:3144:63 [INFO] [stdout] | [INFO] [stdout] 3144 | ... return self.schema_conflict_flags(conflict.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*conflict` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:6707:36 [INFO] [stdout] | [INFO] [stdout] 6707 | ... if sorter_mems.get(i).map_or(false, |mem| mem.is_null()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 6707 - if sorter_mems.get(i).map_or(false, |mem| mem.is_null()) [INFO] [stdout] 6707 + if sorter_mems.get(i).is_some_and(|mem| mem.is_null()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:6708:40 [INFO] [stdout] | [INFO] [stdout] 6708 | ... || record_mems.get(i).map_or(false, |mem| mem.is_null()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 6708 - || record_mems.get(i).map_or(false, |mem| mem.is_null()) [INFO] [stdout] 6708 + || record_mems.get(i).is_some_and(|mem| mem.is_null()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/executor/insert.rs:3304:21 [INFO] [stdout] | [INFO] [stdout] 3304 | / format!( [INFO] [stdout] 3305 | | "no such column: \"\" - should this be a string literal in single-quotes?" [INFO] [stdout] 3306 | | ) [INFO] [stdout] | |_____________________^ help: consider using `.to_string()`: `"no such column: \"\" - should this be a string literal in single-quotes?".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/insert.rs:3889:53 [INFO] [stdout] | [INFO] [stdout] 3889 | let items: Vec<_> = list.iter().map(|e| Self::expr_to_sql(e)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_to_sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/insert.rs:3897:53 [INFO] [stdout] | [INFO] [stdout] 3897 | let parts: Vec<_> = args.iter().map(|e| Self::expr_to_sql(e)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_to_sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/insert.rs:4029:34 [INFO] [stdout] | [INFO] [stdout] 4029 | let mut all_indexes: Vec<( [INFO] [stdout] | __________________________________^ [INFO] [stdout] 4030 | | String, [INFO] [stdout] 4031 | | Vec, [INFO] [stdout] 4032 | | i32, [INFO] [stdout] ... | [INFO] [stdout] 4035 | | Option, [INFO] [stdout] 4036 | | )> = Vec::new(); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/executor/insert.rs:4080:13 [INFO] [stdout] | [INFO] [stdout] 4080 | all_indexes.sort_by(|a, b| b.2.cmp(&a.2)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 4080 - all_indexes.sort_by(|a, b| b.2.cmp(&a.2)); [INFO] [stdout] 4080 + all_indexes.sort_by_key(|b| std::cmp::Reverse(b.2)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/vdbe/engine/mod.rs:7937:37 [INFO] [stdout] | [INFO] [stdout] 7937 | / ... if let crate::parser::ast::Stmt::CreateTrigger(create) = stmt { [INFO] [stdout] 7938 | | ... let if_not_exists = create.if_not_exists; [INFO] [stdout] ... | [INFO] [stdout] 8102 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/vdbe/engine/mod.rs:7936:43 [INFO] [stdout] | [INFO] [stdout] 7936 | ... if let Ok(stmt) = crate::parser::grammar::parse(sql) { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 7937 | ... if let crate::parser::ast::Stmt::CreateTrigger(create) = stmt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/vdbe/engine/mod.rs:8086:41 [INFO] [stdout] | [INFO] [stdout] 8086 | / ... if schema_guard.triggers.contains_key(&trigger_name_lower) { [INFO] [stdout] 8087 | | ... if !if_not_exists { [INFO] [stdout] 8088 | | ... return Err(Error::with_message( [INFO] [stdout] 8089 | | ... ErrorCode::Error, [INFO] [stdout] ... | [INFO] [stdout] 8100 | | ... ); [INFO] [stdout] 8101 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 8086 ~ if let std::collections::hash_map::Entry::Vacant(e) = schema_guard.triggers.entry(trigger_name_lower) { [INFO] [stdout] 8087 + e.insert(std::sync::Arc::new(trigger)); [INFO] [stdout] 8088 + } else { [INFO] [stdout] 8089 + if !if_not_exists { [INFO] [stdout] 8090 + return Err(Error::with_message( [INFO] [stdout] 8091 + ErrorCode::Error, [INFO] [stdout] 8092 + format!( [INFO] [stdout] 8093 + "trigger {} already exists", [INFO] [stdout] 8094 + create.name.display_name() [INFO] [stdout] 8095 + ), [INFO] [stdout] 8096 + )); [INFO] [stdout] 8097 + } [INFO] [stdout] 8098 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/vdbe/engine/mod.rs:8114:37 [INFO] [stdout] | [INFO] [stdout] 8114 | / ... if let crate::parser::ast::Stmt::CreateView(create) = stmt { [INFO] [stdout] 8115 | | ... let view_name_lower = create.name.name.to_lowercase(); [INFO] [stdout] 8116 | | ... let if_not_exists = create.if_not_exists; [INFO] [stdout] ... | [INFO] [stdout] 8145 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/vdbe/engine/mod.rs:8113:43 [INFO] [stdout] | [INFO] [stdout] 8113 | ... if let Ok(stmt) = crate::parser::grammar::parse(sql) { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 8114 | ... if let crate::parser::ast::Stmt::CreateView(create) = stmt { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/vdbe/engine/mod.rs:8119:41 [INFO] [stdout] | [INFO] [stdout] 8119 | / ... if schema_guard.views.contains_key(&view_name_lower) { [INFO] [stdout] 8120 | | ... if !if_not_exists { [INFO] [stdout] 8121 | | ... return Err(crate::error::Error::with_message( [INFO] [stdout] 8122 | | ... crate::error::ErrorCode::Error, [INFO] [stdout] ... | [INFO] [stdout] 8143 | | ... .insert(view_name_lower, std::sync::Arc::new(view)); [INFO] [stdout] 8144 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 8119 ~ if let std::collections::hash_map::Entry::Vacant(e) = schema_guard.views.entry(view_name_lower) { [INFO] [stdout] 8120 + // Create view definition [INFO] [stdout] 8121 + // Use db_idx from ParseSchema P1, not from parsed name [INFO] [stdout] 8122 + // (CREATE TEMP VIEW t1... has no schema prefix on name) [INFO] [stdout] 8123 + let view = crate::schema::View { [INFO] [stdout] 8124 + name: create.name.name.clone(), [INFO] [stdout] 8125 + db_idx, [INFO] [stdout] 8126 + sql: sql.clone(), [INFO] [stdout] 8127 + columns: create.columns.clone(), [INFO] [stdout] 8128 + select: create.query, [INFO] [stdout] 8129 + }; [INFO] [stdout] 8130 + e.insert(std::sync::Arc::new(view)); [INFO] [stdout] 8131 + } else { [INFO] [stdout] 8132 + if !if_not_exists { [INFO] [stdout] 8133 + return Err(crate::error::Error::with_message( [INFO] [stdout] 8134 + crate::error::ErrorCode::Error, [INFO] [stdout] 8135 + format!( [INFO] [stdout] 8136 + "view \"{}\" already exists", [INFO] [stdout] 8137 + create.name.name [INFO] [stdout] 8138 + ), [INFO] [stdout] 8139 + )); [INFO] [stdout] 8140 + } [INFO] [stdout] 8141 + // IF NOT EXISTS was specified, silently succeed [INFO] [stdout] 8142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/vdbe/engine/mod.rs:8604:40 [INFO] [stdout] | [INFO] [stdout] 8604 | ... } else if let Ok(data) = [INFO] [stdout] | ______________________________^ [INFO] [stdout] 8605 | | ... bt_cursor.payload(0, bt_cursor.payload_size()) [INFO] [stdout] 8606 | | ... { [INFO] [stdout] 8607 | | ... Some(data) [INFO] [stdout] 8608 | | ... } else { [INFO] [stdout] 8609 | | ... None [INFO] [stdout] 8610 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] help: replace with [INFO] [stdout] | [INFO] [stdout] 8604 ~ } else { [INFO] [stdout] 8605 + bt_cursor.payload(0, bt_cursor.payload_size()).ok() [INFO] [stdout] 8606 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/vdbe/engine/mod.rs:8858:22 [INFO] [stdout] | [INFO] [stdout] 8858 | .or_insert_with(std::collections::BTreeSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/pragma.rs:180:13 [INFO] [stdout] | [INFO] [stdout] 180 | / let mut rows = Vec::new(); [INFO] [stdout] 181 | | rows.push(vec![Value::Integer(0), Value::Text("BINARY".to_string())]); [INFO] [stdout] 182 | | rows.push(vec![Value::Integer(1), Value::Text("NOCASE".to_string())]); [INFO] [stdout] 183 | | rows.push(vec![Value::Integer(2), Value::Text("RTRIM".to_string())]); [INFO] [stdout] | |_________________________________________________________________________________^ help: consider using the `vec![]` macro: `let rows = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/vdbe/engine/mod.rs:8898:22 [INFO] [stdout] | [INFO] [stdout] 8898 | .or_insert_with(std::collections::BTreeSet::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/vdbe/engine/mod.rs:9290:32 [INFO] [stdout] | [INFO] [stdout] 9290 | } else if let Ok(data) = [INFO] [stdout] | ________________________________^ [INFO] [stdout] 9291 | | btree_cursor.payload(0, btree_cursor.payload_size()) [INFO] [stdout] 9292 | | { [INFO] [stdout] 9293 | | Some(data) [INFO] [stdout] 9294 | | } else { [INFO] [stdout] 9295 | | None [INFO] [stdout] 9296 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] help: replace with [INFO] [stdout] | [INFO] [stdout] 9290 ~ } else { [INFO] [stdout] 9291 + btree_cursor.payload(0, btree_cursor.payload_size()).ok() [INFO] [stdout] 9292 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/vdbe/engine/mod.rs:10468:17 [INFO] [stdout] | [INFO] [stdout] 10468 | format!("unsupported statement type in trigger body"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"unsupported statement type in trigger body".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:10538:25 [INFO] [stdout] | [INFO] [stdout] 10538 | let a_is_null = a_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 10538 - let a_is_null = a_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] 10538 + let a_is_null = a_mem.as_ref().is_none_or(|m| m.is_null()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:10539:25 [INFO] [stdout] | [INFO] [stdout] 10539 | let b_is_null = b_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 10539 - let b_is_null = b_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] 10539 + let b_is_null = b_mem.as_ref().is_none_or(|m| m.is_null()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vdbe/engine/mod.rs:10570:20 [INFO] [stdout] | [INFO] [stdout] 10570 | collation_fns: &[Option Ordering + Send + Sync>>], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/executor/pragma.rs:1530:5 [INFO] [stdout] | [INFO] [stdout] 1530 | / match value.to_lowercase().as_str() { [INFO] [stdout] 1531 | | "on" | "yes" | "true" | "1" => true, [INFO] [stdout] 1532 | | _ => false, [INFO] [stdout] 1533 | | } [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] 1530 - match value.to_lowercase().as_str() { [INFO] [stdout] 1531 - "on" | "yes" | "true" | "1" => true, [INFO] [stdout] 1532 - _ => false, [INFO] [stdout] 1533 - } [INFO] [stdout] 1530 + matches!(value.to_lowercase().as_str(), "on" | "yes" | "true" | "1") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vdbe/engine/mod.rs:10653:20 [INFO] [stdout] | [INFO] [stdout] 10653 | collation_fns: &[Option Ordering + Send + Sync>>], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/executor/pragma.rs:1601:17 [INFO] [stdout] | [INFO] [stdout] 1601 | assert!(result.rows.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.rows.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:10696:25 [INFO] [stdout] | [INFO] [stdout] 10696 | let a_is_null = a_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 10696 - let a_is_null = a_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] 10696 + let a_is_null = a_mem.as_ref().is_none_or(|m| m.is_null()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/vdbe/engine/mod.rs:10697:25 [INFO] [stdout] | [INFO] [stdout] 10697 | let b_is_null = b_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 10697 - let b_is_null = b_mem.as_ref().map_or(true, |m| m.is_null()); [INFO] [stdout] 10697 + let b_is_null = b_mem.as_ref().is_none_or(|m| m.is_null()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/prepare.rs:574:10 [INFO] [stdout] | [INFO] [stdout] 574 | ) -> Result<(Vec, StmtType, Vec, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/vdbe/mem.rs:178:19 [INFO] [stdout] | [INFO] [stdout] 178 | ("-", &rest[1..]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/vdbe/mem.rs:177:30 [INFO] [stdout] | [INFO] [stdout] 177 | let (sign, digits) = if rest.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 177 ~ let (sign, digits) = if let Some() = rest.strip_prefix('-') { [INFO] [stdout] 178 ~ ("-", ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/vdbe/mem.rs:180:19 [INFO] [stdout] | [INFO] [stdout] 180 | ("+", &rest[1..]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/vdbe/mem.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | } else if rest.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 179 ~ } else if let Some() = rest.strip_prefix('+') { [INFO] [stdout] 180 ~ ("+", ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/vdbe/mem.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | &trimmed[..trimmed.len() - 1] // strip decimal point too [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/vdbe/mem.rs:199:23 [INFO] [stdout] | [INFO] [stdout] 199 | let trimmed = if trimmed.ends_with('.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 199 ~ let trimmed = if let Some() = trimmed.strip_suffix('.') { [INFO] [stdout] 200 ~ // strip decimal point too [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/vdbe/mem.rs:215:13 [INFO] [stdout] | [INFO] [stdout] 215 | trimmed[..trimmed.len() - 1].to_string() // strip decimal point too [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/vdbe/mem.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | if trimmed.ends_with('.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 214 ~ if let Some() = trimmed.strip_suffix('.') { [INFO] [stdout] 215 ~ .to_string() // strip decimal point too [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/vdbe/mem.rs:289:5 [INFO] [stdout] | [INFO] [stdout] 289 | / pub fn from_str(value: &str) -> Self { [INFO] [stdout] 290 | | let mut mem = Self::new(); [INFO] [stdout] 291 | | mem.set_str(value); [INFO] [stdout] 292 | | mem [INFO] [stdout] 293 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/vdbe/mem.rs:503:33 [INFO] [stdout] | [INFO] [stdout] 503 | } else if self.is_int() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 504 | | 8 [INFO] [stdout] 505 | | } else if self.is_real() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/vdbe/mem.rs:505:34 [INFO] [stdout] | [INFO] [stdout] 505 | } else if self.is_real() { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 506 | | 8 [INFO] [stdout] 507 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/vdbe/mem.rs:739:33 [INFO] [stdout] | [INFO] [stdout] 739 | } else if self.is_str() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 740 | | !self.data.is_empty() [INFO] [stdout] 741 | | } else if self.is_blob() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/vdbe/mem.rs:741:34 [INFO] [stdout] | [INFO] [stdout] 741 | } else if self.is_blob() { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 742 | | !self.data.is_empty() [INFO] [stdout] 743 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:2841:21 [INFO] [stdout] | [INFO] [stdout] 2841 | / let mut ops = Vec::new(); [INFO] [stdout] 2842 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 2843 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_______________________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/executor/prepare.rs:3517:13 [INFO] [stdout] | [INFO] [stdout] 3517 | / if let Err(e) = self.validate_trigger_body_references(create, trigger_db_idx) { [INFO] [stdout] 3518 | | return Err(e); [INFO] [stdout] 3519 | | } [INFO] [stdout] | |_____________^ help: replace it with: `self.validate_trigger_body_references(create, trigger_db_idx)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4235:30 [INFO] [stdout] | [INFO] [stdout] 4235 | .map(|c| Self::join_constraint_has_parameters(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::join_constraint_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/vdbe/sort.rs:286:5 [INFO] [stdout] | [INFO] [stdout] 286 | / pub fn next(&mut self) -> Result<()> { [INFO] [stdout] 287 | | match self.state { [INFO] [stdout] 288 | | SorterState::Building => { [INFO] [stdout] 289 | | return Err(Error::with_message( [INFO] [stdout] ... | [INFO] [stdout] 306 | | Ok(()) [INFO] [stdout] 307 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4239:33 [INFO] [stdout] | [INFO] [stdout] 4239 | args.iter().any(|e| Self::expr_has_parameters(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4312:53 [INFO] [stdout] | [INFO] [stdout] 4312 | Expr::Vector(exprs) => exprs.iter().any(|e| Self::expr_has_parameters(e)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:4321:34 [INFO] [stdout] | [INFO] [stdout] 4321 | exprs.iter().any(|e| Self::expr_has_parameters(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::expr_has_parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/executor/prepare.rs:4936:27 [INFO] [stdout] | [INFO] [stdout] 4936 | fn from_clause_to_sql(&self, from: &FromClause) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `vdbe::trace::TraceInfo` [INFO] [stdout] --> src/vdbe/trace.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | / pub fn to_string(&self) -> String { [INFO] [stdout] 126 | | match self.event { [INFO] [stdout] 127 | | TraceEvent::Stmt => format!("STMT: {}", self.sql), [INFO] [stdout] 128 | | TraceEvent::Profile => format!( [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `vdbe::trace::TraceInfo` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:5054:46 [INFO] [stdout] | [INFO] [stdout] 5054 | let found = self.temp_schema.map(|s| check_exists(s)).unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&check_exists` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:5059:48 [INFO] [stdout] | [INFO] [stdout] 5059 | let in_temp = self.temp_schema.map(|s| check_exists(s)).unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&check_exists` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/executor/prepare.rs:5060:43 [INFO] [stdout] | [INFO] [stdout] 5060 | let in_main = self.schema.map(|s| check_exists(s)).unwrap_or(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `check_exists` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5117:13 [INFO] [stdout] | [INFO] [stdout] 5117 | / let mut ops = Vec::new(); [INFO] [stdout] 5118 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5119 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_______________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5203:9 [INFO] [stdout] | [INFO] [stdout] 5203 | / let mut ops = Vec::new(); [INFO] [stdout] 5204 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5205 | | ops.push(Self::make_op(Opcode::AutoCommit, 1, 0, 0, P4::Unused)); [INFO] [stdout] 5206 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5231:9 [INFO] [stdout] | [INFO] [stdout] 5231 | / let mut ops = Vec::new(); [INFO] [stdout] 5232 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5233 | | ops.push(Self::make_op( [INFO] [stdout] 5234 | | Opcode::Savepoint, [INFO] [stdout] ... | [INFO] [stdout] 5239 | | )); [INFO] [stdout] 5240 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/prepare.rs:5245:9 [INFO] [stdout] | [INFO] [stdout] 5245 | / let mut ops = Vec::new(); [INFO] [stdout] 5246 | | ops.push(Self::make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 5247 | | ops.push(Self::make_op( [INFO] [stdout] 5248 | | Opcode::Savepoint, [INFO] [stdout] ... | [INFO] [stdout] 5253 | | )); [INFO] [stdout] 5254 | | ops.push(Self::make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/vdbe/value.rs:69:48 [INFO] [stdout] | [INFO] [stdout] 69 | } else if s.parse::().is_ok() { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 70 | | ColumnType::Float [INFO] [stdout] 71 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/vdbe/value.rs:71:20 [INFO] [stdout] | [INFO] [stdout] 71 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 72 | | ColumnType::Float // Default to float for non-numeric strings [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/executor/prepare.rs:6082:60 [INFO] [stdout] | [INFO] [stdout] 6082 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 6083 | | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] 6084 | | _ => return result, [INFO] [stdout] 6085 | | }, [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/prepare.rs:6082:46 [INFO] [stdout] | [INFO] [stdout] 6082 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 6083 | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `expr: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually filling a slice [INFO] [stdout] --> src/executor/prepare.rs:6301:21 [INFO] [stdout] | [INFO] [stdout] 6301 | / for flag in &mut requires_all_cols { [INFO] [stdout] 6302 | | *flag = true; [INFO] [stdout] 6303 | | } [INFO] [stdout] | |_____________________^ help: try: `requires_all_cols.fill(true);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_fill [INFO] [stdout] = note: `#[warn(clippy::manual_slice_fill)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/executor/prepare.rs:6583:1 [INFO] [stdout] | [INFO] [stdout] 6583 | / pub fn compile_sql_with_full_config<'a>( [INFO] [stdout] 6584 | | sql: &'a str, [INFO] [stdout] 6585 | | schema: &crate::schema::Schema, [INFO] [stdout] 6586 | | temp_schema: Option<&crate::schema::Schema>, [INFO] [stdout] ... | [INFO] [stdout] 6593 | | dqs_dml: bool, [INFO] [stdout] 6594 | | ) -> Result<(CompiledStmt, &'a str)> { [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/executor/prepare.rs:6710:17 [INFO] [stdout] | [INFO] [stdout] 6710 | assert!(compiled.column_names.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!compiled.column_names.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vtab/module.rs:350:10 [INFO] [stdout] | [INFO] [stdout] 350 | ) -> Option Result + Send + Sync>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:576:45 [INFO] [stdout] | [INFO] [stdout] 576 | SelectBody::Select(core) => !core.group_by.is_some(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `core.group_by.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/executor/select/mod.rs:1363:5 [INFO] [stdout] | [INFO] [stdout] 1363 | / fn emit_recursive_cte_process_cursor( [INFO] [stdout] 1364 | | &mut self, [INFO] [stdout] 1365 | | src_cursor: i32, [INFO] [stdout] 1366 | | work_cursor: i32, [INFO] [stdout] ... | [INFO] [stdout] 1373 | | done_label: i32, [INFO] [stdout] 1374 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `table_join_types` [INFO] [stdout] --> src/executor/select/mod.rs:1730:18 [INFO] [stdout] | [INFO] [stdout] 1730 | for i in 0..table_cursors.len() { [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] 1730 - for i in 0..table_cursors.len() { [INFO] [stdout] 1730 + for (i, ) in table_join_types.iter().enumerate().take(table_cursors.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/executor/select/mod.rs:2572:28 [INFO] [stdout] | [INFO] [stdout] 2572 | .chain(outer_conds.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 2572 - .chain(outer_conds.into_iter()) [INFO] [stdout] 2572 + .chain(outer_conds) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/executor/select/mod.rs:2715:13 [INFO] [stdout] | [INFO] [stdout] 2715 | / for found_match_reg in &found_match_regs { [INFO] [stdout] 2716 | | if let Some(reg) = found_match_reg { [INFO] [stdout] 2717 | | self.emit(Opcode::Integer, 1, *reg, 0, P4::Unused); [INFO] [stdout] 2718 | | } [INFO] [stdout] 2719 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/executor/select/mod.rs:2716:17 [INFO] [stdout] | [INFO] [stdout] 2716 | / if let Some(reg) = found_match_reg { [INFO] [stdout] 2717 | | self.emit(Opcode::Integer, 1, *reg, 0, P4::Unused); [INFO] [stdout] 2718 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2715 ~ for reg in found_match_regs.iter().flatten() { [INFO] [stdout] 2716 + self.emit(Opcode::Integer, 1, *reg, 0, P4::Unused); [INFO] [stdout] 2717 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/select/mod.rs:2945:20 [INFO] [stdout] | [INFO] [stdout] 2945 | funcs: &mut Vec<( [INFO] [stdout] | ____________________^ [INFO] [stdout] 2946 | | String, [INFO] [stdout] 2947 | | Vec, [INFO] [stdout] 2948 | | Option>, [INFO] [stdout] ... | [INFO] [stdout] 2952 | | usize, [INFO] [stdout] 2953 | | )>, [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/executor/select/mod.rs:4228:9 [INFO] [stdout] | [INFO] [stdout] 4228 | col_refs_to_save.sort_by(|a, b| (a.0, a.1).cmp(&(b.0, b.1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 4228 - col_refs_to_save.sort_by(|a, b| (a.0, a.1).cmp(&(b.0, b.1))); [INFO] [stdout] 4228 + col_refs_to_save.sort_by_key(|a| (a.0, a.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/executor/select/mod.rs:6201:67 [INFO] [stdout] | [INFO] [stdout] 6201 | .and_then(|schema| schema.table(&table_name_lower).map(|t| t.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/executor/select/mod.rs:6204:67 [INFO] [stdout] | [INFO] [stdout] 6204 | .and_then(|schema| schema.table(&table_name_lower).map(|t| t.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/executor/select/mod.rs:6209:72 [INFO] [stdout] | [INFO] [stdout] 6209 | .and_then(|(_, schema)| schema.table(&table_name_lower).map(|t| t.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/executor/select/mod.rs:6760:60 [INFO] [stdout] | [INFO] [stdout] 6760 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 6761 | | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] 6762 | | _ => return false, [INFO] [stdout] 6763 | | }, [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:6760:46 [INFO] [stdout] | [INFO] [stdout] 6760 | ResultColumn::Expr { expr, .. } => match expr { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 6761 | Expr::Column(col_ref) => col_ref.column.to_lowercase(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `expr: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:6805:54 [INFO] [stdout] | [INFO] [stdout] 6805 | if table_name_lower != *order_tbl && alias.as_ref().map_or(true, |a| a != order_tbl) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use a standard comparison instead [INFO] [stdout] | [INFO] [stdout] 6805 - if table_name_lower != *order_tbl && alias.as_ref().map_or(true, |a| a != order_tbl) [INFO] [stdout] 6805 + if table_name_lower != *order_tbl && (alias.as_ref() != Some(order_tbl)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/select/mod.rs:6987:53 [INFO] [stdout] | [INFO] [stdout] 6987 | fn resolve_order_by_aliases(&self, expr: &Expr, base_reg: i32, count: usize) -> Expr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_base_reg` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/select/mod.rs:7006:68 [INFO] [stdout] | [INFO] [stdout] 7006 | left: Box::new(self.resolve_order_by_aliases(left, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 7007 | right: Box::new(self.resolve_order_by_aliases(right, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7011 | expr: Box::new(self.resolve_order_by_aliases(inner, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7014 | self.resolve_order_by_aliases(inner, base_reg, count), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7023 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7027 | when: Box::new(self.resolve_order_by_aliases(&wc.when, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 7028 | then: Box::new(self.resolve_order_by_aliases(&wc.then, base_reg, count)), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7033 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7041 | .map(|e| self.resolve_order_by_aliases(e, base_reg, count)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/select/mod.rs:6987:68 [INFO] [stdout] | [INFO] [stdout] 6987 | fn resolve_order_by_aliases(&self, expr: &Expr, base_reg: i32, count: usize) -> Expr { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/select/mod.rs:7006:78 [INFO] [stdout] | [INFO] [stdout] 7006 | left: Box::new(self.resolve_order_by_aliases(left, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7007 | right: Box::new(self.resolve_order_by_aliases(right, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7011 | expr: Box::new(self.resolve_order_by_aliases(inner, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7014 | self.resolve_order_by_aliases(inner, base_reg, count), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7023 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7027 | when: Box::new(self.resolve_order_by_aliases(&wc.when, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 7028 | then: Box::new(self.resolve_order_by_aliases(&wc.then, base_reg, count)), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7033 | .map(|e| Box::new(self.resolve_order_by_aliases(e, base_reg, count))), [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 7041 | .map(|e| self.resolve_order_by_aliases(e, base_reg, count)) [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/select/mod.rs:7417:10 [INFO] [stdout] | [INFO] [stdout] 7417 | ) -> (Option<(Expr, bool)>, Option<(Expr, bool)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/select/mod.rs:8589:17 [INFO] [stdout] | [INFO] [stdout] 8589 | / if let Some(alias_name) = alias { [INFO] [stdout] 8590 | | let alias_lower = alias_name.to_lowercase(); [INFO] [stdout] ... | [INFO] [stdout] 8601 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:8588:47 [INFO] [stdout] | [INFO] [stdout] 8588 | if let ResultColumn::Expr { expr, alias } = col { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 8589 | if let Some(alias_name) = alias { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern, prefixed by `alias: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:8922:33 [INFO] [stdout] | [INFO] [stdout] 8922 | / ... t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8923 | | ... st.columns [INFO] [stdout] 8924 | | ... .iter() [INFO] [stdout] 8925 | | ... .any(|c| c.name.eq_ignore_ascii_case(&col.column)) [INFO] [stdout] 8926 | | ... }) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 8922 - t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8922 + t.schema_table.as_ref().is_some_and(|st| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/select/mod.rs:8962:33 [INFO] [stdout] | [INFO] [stdout] 8962 | / ... t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8963 | | ... st.columns [INFO] [stdout] 8964 | | ... .iter() [INFO] [stdout] 8965 | | ... .any(|c| c.name.eq_ignore_ascii_case(&col.column)) [INFO] [stdout] 8966 | | ... }) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 8962 - t.schema_table.as_ref().map_or(false, |st| { [INFO] [stdout] 8962 + t.schema_table.as_ref().is_some_and(|st| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/select/mod.rs:8890:41 [INFO] [stdout] | [INFO] [stdout] 8890 | fn expr_to_name(&self, expr: &Expr, index: usize) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/select/mod.rs:8894:75 [INFO] [stdout] | [INFO] [stdout] 8894 | Expr::Collate { expr: inner, .. } => self.expr_to_name(inner, index), [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [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/executor/select/mod.rs:9520:13 [INFO] [stdout] | [INFO] [stdout] 9520 | / match left.as_ref() { [INFO] [stdout] 9521 | | Expr::Column(col) => { [INFO] [stdout] 9522 | | if let Some(ref table_name) = col.table { [INFO] [stdout] 9523 | | if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] ... | [INFO] [stdout] 9534 | | _ => {} [INFO] [stdout] 9535 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 9520 ~ if let Expr::Column(col) = left.as_ref() { [INFO] [stdout] 9521 + if let Some(ref table_name) = col.table { [INFO] [stdout] 9522 + if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9523 + return None; [INFO] [stdout] 9524 + } [INFO] [stdout] 9525 + } else if !col.column.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9526 + return None; [INFO] [stdout] 9527 + } [INFO] [stdout] 9528 + return Some(Fts3MatchFilter { [INFO] [stdout] 9529 + cursor: table.cursor, [INFO] [stdout] 9530 + pattern: (*pattern.clone()), [INFO] [stdout] 9531 + }); [INFO] [stdout] 9532 + } [INFO] [stdout] | [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/executor/select/mod.rs:9565:13 [INFO] [stdout] | [INFO] [stdout] 9565 | / match left.as_ref() { [INFO] [stdout] 9566 | | Expr::Column(col) => { [INFO] [stdout] 9567 | | if let Some(ref table_name) = col.table { [INFO] [stdout] 9568 | | if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] ... | [INFO] [stdout] 9579 | | _ => {} [INFO] [stdout] 9580 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 9565 ~ if let Expr::Column(col) = left.as_ref() { [INFO] [stdout] 9566 + if let Some(ref table_name) = col.table { [INFO] [stdout] 9567 + if !table_name.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9568 + return None; [INFO] [stdout] 9569 + } [INFO] [stdout] 9570 + } else if !col.column.eq_ignore_ascii_case(&table.table_name) { [INFO] [stdout] 9571 + return None; [INFO] [stdout] 9572 + } [INFO] [stdout] 9573 + return Some(Fts3MatchFilter { [INFO] [stdout] 9574 + cursor: table.cursor, [INFO] [stdout] 9575 + pattern: (*pattern.clone()), [INFO] [stdout] 9576 + }); [INFO] [stdout] 9577 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/select/mod.rs:9769:33 [INFO] [stdout] | [INFO] [stdout] 9769 | / ... if let Some(al) = alias { [INFO] [stdout] 9770 | | ... if al.to_lowercase() == col_lower { [INFO] [stdout] ... | [INFO] [stdout] 9777 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:9765:33 [INFO] [stdout] | [INFO] [stdout] 9765 | ... alias, [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] ... [INFO] [stdout] 9769 | ... if let Some(al) = alias { [INFO] [stdout] | ^^^^^^^^ with this pattern, prefixed by `alias: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/executor/select/mod.rs:10171:5 [INFO] [stdout] | [INFO] [stdout] 10171 | / fn compile_or_branch( [INFO] [stdout] 10172 | | &mut self, [INFO] [stdout] 10173 | | table_cursor: i32, [INFO] [stdout] 10174 | | branch: &OrBranch, [INFO] [stdout] ... | [INFO] [stdout] 10179 | | from_idx: usize, [INFO] [stdout] 10180 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/executor/select/mod.rs:10848:69 [INFO] [stdout] | [INFO] [stdout] 10848 | let func_name = if *op == BinaryOp::JsonExtract { [INFO] [stdout] | _____________________________________________________________________^ [INFO] [stdout] 10849 | | "json_extract" [INFO] [stdout] 10850 | | } else { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/executor/select/mod.rs:10850:28 [INFO] [stdout] | [INFO] [stdout] 10850 | } else { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 10851 | | "json_extract" // ->> is json_extract with implicit text conversion [INFO] [stdout] 10852 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/executor/select/mod.rs:10957:44 [INFO] [stdout] | [INFO] [stdout] 10957 | ... Some(p) if p >= 0.0 && p <= 1.0 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/executor/select/mod.rs:11125:37 [INFO] [stdout] | [INFO] [stdout] 11125 | ... op.p5 = crate::vdbe::ops::cmp_flags::JUMPIFNULL as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `crate::vdbe::ops::cmp_flags::JUMPIFNULL` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/executor/select/mod.rs:12220:33 [INFO] [stdout] | [INFO] [stdout] 12220 | / ... if !self.group_column_regs.contains_key(&name_lower) { [INFO] [stdout] 12221 | | ... self.group_column_regs [INFO] [stdout] 12222 | | ... .insert(name_lower, base_reg + idx as i32); [INFO] [stdout] 12223 | | ... } [INFO] [stdout] | |_______________________^ help: try: `self.group_column_regs.entry(name_lower).or_insert(base_reg + idx as i32);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/select/mod.rs:12525:17 [INFO] [stdout] | [INFO] [stdout] 12525 | / if let Some(alias_name) = alias { [INFO] [stdout] 12526 | | if self.expr_has_aggregate(expr) { [INFO] [stdout] 12527 | | aliases.push(alias_name.to_lowercase()); [INFO] [stdout] 12528 | | } [INFO] [stdout] 12529 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/select/mod.rs:12524:47 [INFO] [stdout] | [INFO] [stdout] 12524 | if let ResultColumn::Expr { expr, alias } = col { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 12525 | if let Some(alias_name) = alias { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ with this pattern, prefixed by `alias: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/executor/select/mod.rs:12643:42 [INFO] [stdout] | [INFO] [stdout] 12643 | fn find_aggregate_alias_in_aggregate<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 12646 | aliases: &'a [String], [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 12643 ~ fn find_aggregate_alias_in_aggregate( [INFO] [stdout] 12644 | &self, [INFO] [stdout] 12645 | expr: &Expr, [INFO] [stdout] 12646 ~ aliases: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/trigger.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | / let mut ops = Vec::new(); [INFO] [stdout] 94 | | ops.push(make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 95 | | ops.push(make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/executor/trigger.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | / let mut ops = Vec::new(); [INFO] [stdout] 140 | | ops.push(make_op(Opcode::Init, 0, 1, 0, P4::Unused)); [INFO] [stdout] 141 | | ops.push(make_op(Opcode::Halt, 0, 0, 0, P4::Unused)); [INFO] [stdout] | |_________________________________________________________________^ help: consider using the `vec![]` macro: `let ops = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/executor/trigger.rs:1778:25 [INFO] [stdout] | [INFO] [stdout] 1778 | / if matches!( [INFO] [stdout] 1779 | | op.opcode, [INFO] [stdout] 1780 | | Opcode::OpenRead [INFO] [stdout] 1781 | | | Opcode::OpenWrite [INFO] [stdout] ... | [INFO] [stdout] 1788 | | } [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] 1784 ~ ) [INFO] [stdout] 1785 ~ && op.p1 + 1 > max_cursor { [INFO] [stdout] 1786 | max_cursor = op.p1 + 1; [INFO] [stdout] 1787 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/executor/trigger.rs:1965:1 [INFO] [stdout] | [INFO] [stdout] 1965 | / pub fn generate_trigger_code( [INFO] [stdout] 1966 | | triggers: &[Arc], [INFO] [stdout] 1967 | | schema: Option<&Schema>, [INFO] [stdout] 1968 | | table_name: &str, [INFO] [stdout] ... | [INFO] [stdout] 1974 | | return_label: i32, [INFO] [stdout] 1975 | | ) -> Result> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/executor/trigger.rs:2021:22 [INFO] [stdout] | [INFO] [stdout] 2021 | *next_reg += (row_size * 2) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(row_size * 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/executor/trigger.rs:2045:39 [INFO] [stdout] | [INFO] [stdout] 2045 | let new_base = base_reg + row_size as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `row_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/update.rs:1799:53 [INFO] [stdout] | [INFO] [stdout] 1799 | / ... if let Expr::Column(col_ref) = expr { [INFO] [stdout] 1800 | | ... // Find column index [INFO] [stdout] 1801 | | ... table_def [INFO] [stdout] 1802 | | ... .columns [INFO] [stdout] ... | [INFO] [stdout] 1807 | | ... 0 [INFO] [stdout] 1808 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/update.rs:1795:53 [INFO] [stdout] | [INFO] [stdout] 1795 | ... expr, [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] ... [INFO] [stdout] 1799 | ... if let Expr::Column(col_ref) = expr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `expr: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/executor/where_clause.rs:778:49 [INFO] [stdout] | [INFO] [stdout] 778 | fn split_where_expr(&mut self, expr: &Expr, depth: i32) -> Result<()> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/executor/where_clause.rs:786:45 [INFO] [stdout] | [INFO] [stdout] 786 | self.split_where_expr(left, depth + 1)?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 787 | self.split_where_expr(right, depth + 1)?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:888:21 [INFO] [stdout] | [INFO] [stdout] 888 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:893:25 [INFO] [stdout] | [INFO] [stdout] 893 | let like_terms: Vec<( [INFO] [stdout] | _________________________^ [INFO] [stdout] 894 | | usize, [INFO] [stdout] 895 | | Box, [INFO] [stdout] 896 | | Box, [INFO] [stdout] ... | [INFO] [stdout] 900 | | u64, [INFO] [stdout] 901 | | )> = self [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:1065:21 [INFO] [stdout] | [INFO] [stdout] 1065 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:1227:21 [INFO] [stdout] | [INFO] [stdout] 1227 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/executor/where_clause.rs:1298:21 [INFO] [stdout] | [INFO] [stdout] 1298 | table_info: &[(String, Option, u64, Vec, i32, Vec)], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/executor/where_clause.rs:1468:9 [INFO] [stdout] | [INFO] [stdout] 1468 | while let Some(ch) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for ch in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: checking if a string is ascii using iterators [INFO] [stdout] --> src/executor/where_clause.rs:1504:35 [INFO] [stdout] | [INFO] [stdout] 1504 | if !is_case_sensitive && !prefix.chars().all(|c| c.is_ascii()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prefix.is_ascii()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_character_iteration [INFO] [stdout] = note: `#[warn(clippy::needless_character_iteration)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/where_clause.rs:1768:25 [INFO] [stdout] | [INFO] [stdout] 1768 | / match list { [INFO] [stdout] 1769 | | crate::parser::ast::InList::Values(v) => v.len(), [INFO] [stdout] 1770 | | _ => 10, // Estimate for subqueries [INFO] [stdout] 1771 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/where_clause.rs:1767:58 [INFO] [stdout] | [INFO] [stdout] 1767 | let values_count = if let Expr::In { list, .. } = term.expr.as_ref() { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 1768 | match list { [INFO] [stdout] 1769 | crate::parser::ast::InList::Values(v) => v.len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern, prefixed by `list: ` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2231:24 [INFO] [stdout] | [INFO] [stdout] 2231 | if best.as_ref().map_or(true, |b| cost < b.cost) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 2231 - if best.as_ref().map_or(true, |b| cost < b.cost) { [INFO] [stdout] 2231 + if best.as_ref().is_none_or(|b| cost < b.cost) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2314:33 [INFO] [stdout] | [INFO] [stdout] 2314 | let alias_matches = table [INFO] [stdout] | _________________________________^ [INFO] [stdout] 2315 | | .alias [INFO] [stdout] 2316 | | .as_ref() [INFO] [stdout] 2317 | | .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2317 - .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] 2317 + .is_some_and(|a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2329:17 [INFO] [stdout] | [INFO] [stdout] 2329 | / table [INFO] [stdout] 2330 | | .columns [INFO] [stdout] 2331 | | .get(table.ipk_column as usize) [INFO] [stdout] 2332 | | .map_or(false, |c| c.to_lowercase() == col_name_lower) [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2332 - .map_or(false, |c| c.to_lowercase() == col_name_lower) [INFO] [stdout] 2332 + .is_some_and(|c| c.to_lowercase() == col_name_lower) [INFO] [stdout] | [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/executor/where_clause.rs:2351:9 [INFO] [stdout] | [INFO] [stdout] 2351 | / match Self::unwrap_parens(expr) { [INFO] [stdout] 2352 | | Expr::Binary { op, left, right } => { [INFO] [stdout] 2353 | | match op { [INFO] [stdout] 2354 | | BinaryOp::And => { [INFO] [stdout] ... | [INFO] [stdout] 2374 | | _ => {} [INFO] [stdout] 2375 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 2351 ~ if let Expr::Binary { op, left, right } = Self::unwrap_parens(expr) { [INFO] [stdout] 2352 + match op { [INFO] [stdout] 2353 + BinaryOp::And => { [INFO] [stdout] 2354 + // Recurse into AND branches [INFO] [stdout] 2355 + self.collect_equality_exprs(left, table_idx, results); [INFO] [stdout] 2356 + self.collect_equality_exprs(right, table_idx, results); [INFO] [stdout] 2357 + } [INFO] [stdout] 2358 + BinaryOp::Eq | BinaryOp::Is => { [INFO] [stdout] 2359 + // Check for column = value [INFO] [stdout] 2360 + if let Some((col_idx, value)) = [INFO] [stdout] 2361 + self.extract_column_eq(left, right, table_idx) [INFO] [stdout] 2362 + { [INFO] [stdout] 2363 + results.push((col_idx, value)); [INFO] [stdout] 2364 + } else if let Some((col_idx, value)) = [INFO] [stdout] 2365 + self.extract_column_eq(right, left, table_idx) [INFO] [stdout] 2366 + { [INFO] [stdout] 2367 + results.push((col_idx, value)); [INFO] [stdout] 2368 + } [INFO] [stdout] 2369 + } [INFO] [stdout] 2370 + _ => {} [INFO] [stdout] 2371 + } [INFO] [stdout] 2372 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/executor/where_clause.rs:2393:37 [INFO] [stdout] | [INFO] [stdout] 2393 | let alias_matches = table [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 2394 | | .alias [INFO] [stdout] 2395 | | .as_ref() [INFO] [stdout] 2396 | | .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | |_____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2396 - .map_or(false, |a| a.to_lowercase() == tbl_lower); [INFO] [stdout] 2396 + .is_some_and(|a| a.to_lowercase() == tbl_lower); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sqlite3_column_int64` [INFO] [stdout] --> tests/replace_partial_index.rs:8:42 [INFO] [stdout] | [INFO] [stdout] 8 | sqlite3_close, sqlite3_column_count, sqlite3_column_int64, sqlite3_column_text, [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 let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/executor/where_expr.rs:248:17 [INFO] [stdout] | [INFO] [stdout] 248 | / if let JoinConstraint::On(expr) = constraint { [INFO] [stdout] 249 | | mask |= expr_usage(expr, tables); [INFO] [stdout] 250 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/executor/where_expr.rs:247:25 [INFO] [stdout] | [INFO] [stdout] 247 | if let Some(constraint) = constraint { [INFO] [stdout] | ^^^^^^^^^^ replace this binding [INFO] [stdout] 248 | if let JoinConstraint::On(expr) = constraint { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `err` [INFO] [stdout] --> tests/replace_partial_index.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | / match run_sql(conn, sql) { [INFO] [stdout] 72 | | Ok(_) => None, [INFO] [stdout] 73 | | Err(e) => Some(e), [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ help: replace with: `run_sql(conn, sql).err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/fts5/expr.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | / loop { [INFO] [stdout] 93 | | let distance = match self.peek() { [INFO] [stdout] 94 | | Some(Fts5QueryToken::Near(distance)) => *distance, [INFO] [stdout] 95 | | _ => break, [INFO] [stdout] ... | [INFO] [stdout] 99 | | expr = Fts5Expr::Near(vec![expr, right], distance); [INFO] [stdout] 100 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ while let Some(Fts5QueryToken::Near(distance)) = self.peek() { [INFO] [stdout] 93 + let distance = *distance; [INFO] [stdout] 94 + .. [INFO] [stdout] 95 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fts5/index.rs:114:18 [INFO] [stdout] | [INFO] [stdout] 114 | let hi = (ioff as i64) & ((0x7fff_ffff_i64) << 32); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `ioff` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/fts5/index.rs:115:19 [INFO] [stdout] | [INFO] [stdout] 115 | let lo = (ioff as i64 + (val as i64 - 2)) & 0x7fff_ffff; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `ioff` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Fts5Segment` [INFO] [stdout] --> src/fts5/index.rs:395:5 [INFO] [stdout] | [INFO] [stdout] 395 | / pub fn new() -> Self { [INFO] [stdout] 396 | | Self { [INFO] [stdout] 397 | | terms: std::collections::BTreeMap::new(), [INFO] [stdout] 398 | | } [INFO] [stdout] 399 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 394 + impl Default for Fts5Segment { [INFO] [stdout] 395 + fn default() -> Self { [INFO] [stdout] 396 + Self::new() [INFO] [stdout] 397 + } [INFO] [stdout] 398 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/fts5/index.rs:593:5 [INFO] [stdout] | [INFO] [stdout] 593 | positions.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 593 - positions.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] 593 + positions.sort_by_key(|a| (a.column, a.offset)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fts5/index.rs:792:9 [INFO] [stdout] | [INFO] [stdout] 792 | assert_eq!(decoded[0].deleted, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 792 - assert_eq!(decoded[0].deleted, false); [INFO] [stdout] 792 + assert!(!decoded[0].deleted); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/fts5/index.rs:795:9 [INFO] [stdout] | [INFO] [stdout] 795 | assert_eq!(decoded[1].deleted, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 795 - assert_eq!(decoded[1].deleted, true); [INFO] [stdout] 795 + assert!(decoded[1].deleted); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/fts5/main.rs:302:21 [INFO] [stdout] | [INFO] [stdout] 302 | phrase_pos.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 302 - phrase_pos.sort_by(|a, b| (a.column, a.offset).cmp(&(b.column, b.offset))); [INFO] [stdout] 302 + phrase_pos.sort_by_key(|a| (a.column, a.offset)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sqlite3_column_int64` [INFO] [stdout] --> tests/update_or_replace.rs:8:42 [INFO] [stdout] | [INFO] [stdout] 8 | sqlite3_close, sqlite3_column_count, sqlite3_column_int64, sqlite3_column_text, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `z.get(0)` [INFO] [stdout] --> src/fts5/porter.rs:6:14 [INFO] [stdout] | [INFO] [stdout] 6 | let x = *z.get(0).unwrap_or(&0); [INFO] [stdout] | ^^^^^^^^ help: try: `z.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 `z.get(0)` [INFO] [stdout] --> src/fts5/porter.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | let x = *z.get(0).unwrap_or(&0); [INFO] [stdout] | ^^^^^^^^ help: try: `z.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 `z.get(0)` [INFO] [stdout] --> src/fts5/porter.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | z.get(0).copied().unwrap_or(0) != 0 [INFO] [stdout] | ^^^^^^^^ help: try: `z.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: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:146:12 [INFO] [stdout] | [INFO] [stdout] 146 | if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 - if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] 146 + if c.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:149:16 [INFO] [stdout] | [INFO] [stdout] 149 | if (b'0'..=b'9').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 149 - if (b'0'..=b'9').contains(&c) { [INFO] [stdout] 149 + if c.is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/fts5/porter.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | if n_in < 3 || n_in >= 21 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(3..21).contains(&n_in)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:175:24 [INFO] [stdout] | [INFO] [stdout] 175 | let lower = if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 - let lower = if (b'A'..=b'Z').contains(&c) { [INFO] [stdout] 175 + let lower = if c.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/porter.rs:177:19 [INFO] [stdout] | [INFO] [stdout] 177 | } else if (b'a'..=b'z').contains(&c) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - } else if (b'a'..=b'z').contains(&c) { [INFO] [stdout] 177 + } else if c.is_ascii_lowercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/fts5/porter.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | / if z[z_start] == b's' { [INFO] [stdout] 191 | | if !stem(z, &mut z_start, b"sess", b"ss", None) [INFO] [stdout] 192 | | && !stem(z, &mut z_start, b"sei", b"i", None) [INFO] [stdout] 193 | | && !stem(z, &mut z_start, b"ss", b"ss", None) [INFO] [stdout] ... | [INFO] [stdout] 197 | | } [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] 190 ~ if z[z_start] == b's' [INFO] [stdout] 191 ~ && !stem(z, &mut z_start, b"sess", b"ss", None) [INFO] [stdout] 192 | && !stem(z, &mut z_start, b"sei", b"i", None) [INFO] [stdout] ... [INFO] [stdout] 195 | z_start += 1; [INFO] [stdout] 196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:229:13 [INFO] [stdout] | [INFO] [stdout] 229 | / if !stem(z, &mut z_start, b"lanoita", b"ate", Some(m_gt_0)) { [INFO] [stdout] 230 | | stem(z, &mut z_start, b"lanoit", b"tion", Some(m_gt_0)); [INFO] [stdout] 231 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 228 ~ b'a' [INFO] [stdout] 229 ~ if !stem(z, &mut z_start, b"lanoita", b"ate", Some(m_gt_0)) => { [INFO] [stdout] 230 | stem(z, &mut z_start, b"lanoit", b"tion", Some(m_gt_0)); [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:234:13 [INFO] [stdout] | [INFO] [stdout] 234 | / if !stem(z, &mut z_start, b"icne", b"ence", Some(m_gt_0)) { [INFO] [stdout] 235 | | stem(z, &mut z_start, b"icna", b"ance", Some(m_gt_0)); [INFO] [stdout] 236 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 233 ~ b'c' [INFO] [stdout] 234 ~ if !stem(z, &mut z_start, b"icne", b"ence", Some(m_gt_0)) => { [INFO] [stdout] 235 | stem(z, &mut z_start, b"icna", b"ance", Some(m_gt_0)); [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / if !stem(z, &mut z_start, b"ilb", b"ble", Some(m_gt_0)) [INFO] [stdout] 246 | | && !stem(z, &mut z_start, b"illa", b"al", Some(m_gt_0)) [INFO] [stdout] 247 | | && !stem(z, &mut z_start, b"iltne", b"ent", Some(m_gt_0)) [INFO] [stdout] 248 | | && !stem(z, &mut z_start, b"ile", b"e", Some(m_gt_0)) [INFO] [stdout] 249 | | { [INFO] [stdout] 250 | | stem(z, &mut z_start, b"ilsuo", b"ous", Some(m_gt_0)); [INFO] [stdout] 251 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 244 ~ b'l' [INFO] [stdout] 245 | if !stem(z, &mut z_start, b"ilb", b"ble", Some(m_gt_0)) [INFO] [stdout] ... [INFO] [stdout] 248 | && !stem(z, &mut z_start, b"ile", b"e", Some(m_gt_0)) [INFO] [stdout] 249 ~ => { [INFO] [stdout] 250 | stem(z, &mut z_start, b"ilsuo", b"ous", Some(m_gt_0)); [INFO] [stdout] 251 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:254:13 [INFO] [stdout] | [INFO] [stdout] 254 | / if !stem(z, &mut z_start, b"noitazi", b"ize", Some(m_gt_0)) [INFO] [stdout] 255 | | && !stem(z, &mut z_start, b"noita", b"ate", Some(m_gt_0)) [INFO] [stdout] 256 | | { [INFO] [stdout] 257 | | stem(z, &mut z_start, b"rota", b"ate", Some(m_gt_0)); [INFO] [stdout] 258 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 253 ~ b'o' [INFO] [stdout] 254 | if !stem(z, &mut z_start, b"noitazi", b"ize", Some(m_gt_0)) [INFO] [stdout] 255 | && !stem(z, &mut z_start, b"noita", b"ate", Some(m_gt_0)) [INFO] [stdout] 256 ~ => { [INFO] [stdout] 257 | stem(z, &mut z_start, b"rota", b"ate", Some(m_gt_0)); [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | / if !stem(z, &mut z_start, b"msila", b"al", Some(m_gt_0)) [INFO] [stdout] 262 | | && !stem(z, &mut z_start, b"ssenevi", b"ive", Some(m_gt_0)) [INFO] [stdout] 263 | | && !stem(z, &mut z_start, b"ssenluf", b"ful", Some(m_gt_0)) [INFO] [stdout] ... | [INFO] [stdout] 266 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 260 ~ b's' [INFO] [stdout] 261 | if !stem(z, &mut z_start, b"msila", b"al", Some(m_gt_0)) [INFO] [stdout] 262 | && !stem(z, &mut z_start, b"ssenevi", b"ive", Some(m_gt_0)) [INFO] [stdout] 263 | && !stem(z, &mut z_start, b"ssenluf", b"ful", Some(m_gt_0)) [INFO] [stdout] 264 ~ => { [INFO] [stdout] 265 | stem(z, &mut z_start, b"ssensuo", b"ous", Some(m_gt_0)); [INFO] [stdout] 266 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:269:13 [INFO] [stdout] | [INFO] [stdout] 269 | / if !stem(z, &mut z_start, b"itila", b"al", Some(m_gt_0)) [INFO] [stdout] 270 | | && !stem(z, &mut z_start, b"itivi", b"ive", Some(m_gt_0)) [INFO] [stdout] 271 | | { [INFO] [stdout] 272 | | stem(z, &mut z_start, b"itilib", b"ble", Some(m_gt_0)); [INFO] [stdout] 273 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 268 ~ b't' [INFO] [stdout] 269 | if !stem(z, &mut z_start, b"itila", b"al", Some(m_gt_0)) [INFO] [stdout] 270 | && !stem(z, &mut z_start, b"itivi", b"ive", Some(m_gt_0)) [INFO] [stdout] 271 ~ => { [INFO] [stdout] 272 | stem(z, &mut z_start, b"itilib", b"ble", Some(m_gt_0)); [INFO] [stdout] 273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | / if !stem(z, &mut z_start, b"etaci", b"ic", Some(m_gt_0)) [INFO] [stdout] 281 | | && !stem(z, &mut z_start, b"evita", b"", Some(m_gt_0)) [INFO] [stdout] 282 | | { [INFO] [stdout] 283 | | stem(z, &mut z_start, b"ezila", b"al", Some(m_gt_0)); [INFO] [stdout] 284 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 279 ~ b'e' [INFO] [stdout] 280 | if !stem(z, &mut z_start, b"etaci", b"ic", Some(m_gt_0)) [INFO] [stdout] 281 | && !stem(z, &mut z_start, b"evita", b"", Some(m_gt_0)) [INFO] [stdout] 282 ~ => { [INFO] [stdout] 283 | stem(z, &mut z_start, b"ezila", b"al", Some(m_gt_0)); [INFO] [stdout] 284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:290:13 [INFO] [stdout] | [INFO] [stdout] 290 | / if !stem(z, &mut z_start, b"laci", b"ic", Some(m_gt_0)) { [INFO] [stdout] 291 | | stem(z, &mut z_start, b"luf", b"", Some(m_gt_0)); [INFO] [stdout] 292 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 289 ~ b'l' [INFO] [stdout] 290 ~ if !stem(z, &mut z_start, b"laci", b"ic", Some(m_gt_0)) => { [INFO] [stdout] 291 | stem(z, &mut z_start, b"luf", b"", Some(m_gt_0)); [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | / if z.get(z_start).copied().unwrap_or(0) == b'l' && m_gt_1(&z[z_start + 2..]) { [INFO] [stdout] 303 | | z_start += 2; [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 301 ~ b'a' [INFO] [stdout] 302 ~ if z.get(z_start).copied().unwrap_or(0) == b'l' && m_gt_1(&z[z_start + 2..]) => { [INFO] [stdout] 303 | z_start += 2; [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | / if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 308 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'n' [INFO] [stdout] 309 | | && (z.get(z_start + 3).copied().unwrap_or(0) == b'a' [INFO] [stdout] 310 | | || z.get(z_start + 3).copied().unwrap_or(0) == b'e') [INFO] [stdout] ... | [INFO] [stdout] 313 | | z_start += 4; [INFO] [stdout] 314 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ b'c' [INFO] [stdout] 307 | if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] ... [INFO] [stdout] 311 | && m_gt_1(&z[z_start + 4..]) [INFO] [stdout] 312 ~ => { [INFO] [stdout] 313 | z_start += 4; [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:317:13 [INFO] [stdout] | [INFO] [stdout] 317 | / if z.get(z_start).copied().unwrap_or(0) == b'r' && m_gt_1(&z[z_start + 2..]) { [INFO] [stdout] 318 | | z_start += 2; [INFO] [stdout] 319 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 316 ~ b'e' [INFO] [stdout] 317 ~ if z.get(z_start).copied().unwrap_or(0) == b'r' && m_gt_1(&z[z_start + 2..]) => { [INFO] [stdout] 318 | z_start += 2; [INFO] [stdout] 319 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:322:13 [INFO] [stdout] | [INFO] [stdout] 322 | / if z.get(z_start).copied().unwrap_or(0) == b'c' && m_gt_1(&z[z_start + 2..]) { [INFO] [stdout] 323 | | z_start += 2; [INFO] [stdout] 324 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 321 ~ b'i' [INFO] [stdout] 322 ~ if z.get(z_start).copied().unwrap_or(0) == b'c' && m_gt_1(&z[z_start + 2..]) => { [INFO] [stdout] 323 | z_start += 2; [INFO] [stdout] 324 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | / if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 328 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'b' [INFO] [stdout] 329 | | && (z.get(z_start + 3).copied().unwrap_or(0) == b'a' [INFO] [stdout] 330 | | || z.get(z_start + 3).copied().unwrap_or(0) == b'i') [INFO] [stdout] ... | [INFO] [stdout] 333 | | z_start += 4; [INFO] [stdout] 334 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 326 ~ b'l' [INFO] [stdout] 327 | if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] ... [INFO] [stdout] 331 | && m_gt_1(&z[z_start + 4..]) [INFO] [stdout] 332 ~ => { [INFO] [stdout] 333 | z_start += 4; [INFO] [stdout] 334 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:337:13 [INFO] [stdout] | [INFO] [stdout] 337 | / if z.get(z_start).copied().unwrap_or(0) == b't' { [INFO] [stdout] 338 | | if z.get(z_start + 2).copied().unwrap_or(0) == b'a' { [INFO] [stdout] 339 | | if m_gt_1(&z[z_start + 3..]) { [INFO] [stdout] 340 | | z_start += 3; [INFO] [stdout] ... | [INFO] [stdout] 349 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 336 ~ b'n' [INFO] [stdout] 337 ~ if z.get(z_start).copied().unwrap_or(0) == b't' => { [INFO] [stdout] 338 | if z.get(z_start + 2).copied().unwrap_or(0) == b'a' { [INFO] [stdout] ... [INFO] [stdout] 348 | } [INFO] [stdout] 349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if z.get(z_start).copied().unwrap_or(0) == b'm' [INFO] [stdout] 364 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 365 | | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] ... | [INFO] [stdout] 368 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 362 ~ b's' [INFO] [stdout] 363 | if z.get(z_start).copied().unwrap_or(0) == b'm' [INFO] [stdout] 364 | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 365 | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] 366 ~ => { [INFO] [stdout] 367 | z_start += 3; [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:371:13 [INFO] [stdout] | [INFO] [stdout] 371 | / if !stem(z, &mut z_start, b"eta", b"", Some(m_gt_1)) { [INFO] [stdout] 372 | | stem(z, &mut z_start, b"iti", b"", Some(m_gt_1)); [INFO] [stdout] 373 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 370 ~ b't' [INFO] [stdout] 371 ~ if !stem(z, &mut z_start, b"eta", b"", Some(m_gt_1)) => { [INFO] [stdout] 372 | stem(z, &mut z_start, b"iti", b"", Some(m_gt_1)); [INFO] [stdout] 373 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `sqlite3-ffi` [INFO] [stdout] --> tests/exec_comparison.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | #![cfg(feature = "sqlite3-ffi")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `crossterm`, `default`, `fts3`, `fts5`, `json`, `rtree`, `session`, `tcl`, and `tui` [INFO] [stdout] = help: consider adding `sqlite3-ffi` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:376:13 [INFO] [stdout] | [INFO] [stdout] 376 | / if z.get(z_start).copied().unwrap_or(0) == b's' [INFO] [stdout] 377 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'o' [INFO] [stdout] 378 | | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] ... | [INFO] [stdout] 381 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 375 ~ b'u' [INFO] [stdout] 376 | if z.get(z_start).copied().unwrap_or(0) == b's' [INFO] [stdout] 377 | && z.get(z_start + 2).copied().unwrap_or(0) == b'o' [INFO] [stdout] 378 | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] 379 ~ => { [INFO] [stdout] 380 | z_start += 3; [INFO] [stdout] 381 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/fts5/porter.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | / if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 385 | | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 386 | | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] ... | [INFO] [stdout] 389 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 383 ~ b'v' | b'z' [INFO] [stdout] 384 | if z.get(z_start).copied().unwrap_or(0) == b'e' [INFO] [stdout] 385 | && z.get(z_start + 2).copied().unwrap_or(0) == b'i' [INFO] [stdout] 386 | && m_gt_1(&z[z_start + 3..]) [INFO] [stdout] 387 ~ => { [INFO] [stdout] 388 | z_start += 3; [INFO] [stdout] 389 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/fts5/porter.rs:342:24 [INFO] [stdout] | [INFO] [stdout] 342 | } else if z.get(z_start + 2).copied().unwrap_or(0) == b'e' { [INFO] [stdout] | ________________________^ [INFO] [stdout] 343 | | if !stem(z, &mut z_start, b"tneme", b"", Some(m_gt_1)) [INFO] [stdout] 344 | | && !stem(z, &mut z_start, b"tnem", b"", Some(m_gt_1)) [INFO] [stdout] ... | [INFO] [stdout] 348 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 342 ~ } else if z.get(z_start + 2).copied().unwrap_or(0) == b'e' [INFO] [stdout] 343 ~ && !stem(z, &mut z_start, b"tneme", b"", Some(m_gt_1)) [INFO] [stdout] 344 | && !stem(z, &mut z_start, b"tnem", b"", Some(m_gt_1)) [INFO] [stdout] 345 | { [INFO] [stdout] 346 | stem(z, &mut z_start, b"tne", b"", Some(m_gt_1)); [INFO] [stdout] 347 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/fts5/porter.rs:395:38 [INFO] [stdout] | [INFO] [stdout] 395 | if m_gt_1(&z[z_start + 1..]) { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 396 | | z_start += 1; [INFO] [stdout] 397 | | } else if m_eq_1(&z[z_start + 1..]) && !star_oh(&z[z_start + 1..]) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/fts5/porter.rs:397:76 [INFO] [stdout] | [INFO] [stdout] 397 | } else if m_eq_1(&z[z_start + 1..]) && !star_oh(&z[z_start + 1..]) { [INFO] [stdout] | ____________________________________________________________________________^ [INFO] [stdout] 398 | | z_start += 1; [INFO] [stdout] 399 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/fts5/tokenizer.rs:170:24 [INFO] [stdout] | [INFO] [stdout] 170 | if (b'A'..=b'Z').contains(byte) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 - if (b'A'..=b'Z').contains(byte) { [INFO] [stdout] 170 + if byte.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/bin/rustql.rs:339:21 [INFO] [stdout] | [INFO] [stdout] 339 | _ => break, [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/bin/rustql.rs:339:21 [INFO] [stdout] | [INFO] [stdout] 316 | Ok(StepResult::Row) => { [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 329 | Ok(StepResult::Done) => break, [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] 330 | Err(e) => { [INFO] [stdout] | ------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 339 | _ => break, [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PorterTokenizer` [INFO] [stdout] --> src/fts5/tokenizer.rs:329:5 [INFO] [stdout] | [INFO] [stdout] 329 | / pub fn new() -> Self { [INFO] [stdout] 330 | | Self { [INFO] [stdout] 331 | | base: Unicode61Tokenizer { [INFO] [stdout] 332 | | remove_diacritics: 1, [INFO] [stdout] ... | [INFO] [stdout] 337 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 328 + impl Default for PorterTokenizer { [INFO] [stdout] 329 + fn default() -> Self { [INFO] [stdout] 330 + Self::new() [INFO] [stdout] 331 + } [INFO] [stdout] 332 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/fts5/unicode.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | if c < 768 || c > 817 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `!(768..=817).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/fts5/unicode.rs:1014:27 [INFO] [stdout] | [INFO] [stdout] 1014 | ret = ((c + AI_OFF[(flag >> 1) as usize] as i32) & 0x0000ffff) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((c + AI_OFF[(flag >> 1) as usize] as i32) & 0x0000ffff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/fts5/unicode.rs:1021:15 [INFO] [stdout] | [INFO] [stdout] 1021 | } else if c >= 66560 && c < 66600 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(66560..66600).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_rowid` after checking its variant with `is_some` [INFO] [stdout] --> src/fts5/vtab_adapter.rs:182:25 [INFO] [stdout] | [INFO] [stdout] 180 | if rowid.is_none() && new_rowid.is_some() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 181 | // INSERT [INFO] [stdout] 182 | let rowid = new_rowid.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/rustql.rs:390:46 [INFO] [stdout] | [INFO] [stdout] 390 | let name = col_names.get(i as usize).map(|s| s.as_str()).unwrap_or("?"); [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/fts5/vtab_adapter.rs:301:6 [INFO] [stdout] | [INFO] [stdout] 301 | ) -> Result<(Vec, String, Vec, bool, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/bin/rustql.rs:339:21 [INFO] [stdout] | [INFO] [stdout] 339 | _ => break, [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/bin/rustql.rs:339:21 [INFO] [stdout] | [INFO] [stdout] 316 | Ok(StepResult::Row) => { [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 329 | Ok(StepResult::Done) => break, [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] 330 | Err(e) => { [INFO] [stdout] | ------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 339 | _ => break, [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/functions/aggregate.rs:647:28 [INFO] [stdout] | [INFO] [stdout] 647 | min_state.step(&[v.clone()]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `std::slice::from_ref(v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `clone` can be replaced with `std::slice::from_ref` [INFO] [stdout] --> src/functions/aggregate.rs:648:28 [INFO] [stdout] | [INFO] [stdout] 648 | max_state.step(&[v.clone()]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `std::slice::from_ref(v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/rustql.rs:390:46 [INFO] [stdout] | [INFO] [stdout] 390 | let name = col_names.get(i as usize).map(|s| s.as_str()).unwrap_or("?"); [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:593:22 [INFO] [stdout] | [INFO] [stdout] 593 | fn to_julian_day(&mut self) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:598:24 [INFO] [stdout] | [INFO] [stdout] 598 | fn to_unix_seconds(&mut self) -> f64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:716:21 [INFO] [stdout] | [INFO] [stdout] 716 | fn to_localtime(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/functions/datetime.rs:752:15 [INFO] [stdout] | [INFO] [stdout] 752 | fn to_utc(&mut self) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bytes` [INFO] [stdout] --> src/functions/datetime.rs:804:14 [INFO] [stdout] | [INFO] [stdout] 804 | for i in start..start + count { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 804 - for i in start..start + count { [INFO] [stdout] 804 + for in bytes.iter().skip(start).take(count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `args.get(0)` [INFO] [stdout] --> src/functions/fts5.rs:182:15 [INFO] [stdout] | [INFO] [stdout] 182 | let col = args.get(0).map(value_to_i64).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.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 `args.get(0)` [INFO] [stdout] --> src/functions/fts5.rs:235:15 [INFO] [stdout] | [INFO] [stdout] 235 | let col = args.get(0).map(value_to_i64).unwrap_or(-1); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `args.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: length comparison to one [INFO] [stdout] --> tests/where_debug.rs:375:9 [INFO] [stdout] | [INFO] [stdout] 375 | result.len() >= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> tests/where_debug.rs:421:9 [INFO] [stdout] | [INFO] [stdout] 421 | result[1][1] == "" || result[1][1] == "NULL", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `result[1][1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/json.rs:411:40 [INFO] [stdout] | [INFO] [stdout] 411 | if let Ok(n) = idx_s[2..].parse::() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/json.rs:409:24 [INFO] [stdout] | [INFO] [stdout] 409 | } else if idx_s.starts_with("#-") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 409 ~ } else if let Some() = idx_s.strip_prefix("#-") { [INFO] [stdout] 410 | if let JsonValue::Array(arr) = current { [INFO] [stdout] 411 ~ if let Ok(n) = .parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/functions/json.rs:821:8 [INFO] [stdout] | [INFO] [stdout] 821 | if args.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!args.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/functions/json.rs:889:26 [INFO] [stdout] | [INFO] [stdout] 889 | if args.len() < 3 || (args.len() - 1) % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!(args.len() - 1).is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/functions/json.rs:892:13 [INFO] [stdout] | [INFO] [stdout] 892 | &format!("wrong number of arguments to function {}()", name), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("wrong number of arguments to function {}()", name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/functions/json.rs:1000:8 [INFO] [stdout] | [INFO] [stdout] 1000 | if args.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!args.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> tests/where_debug.rs:889:36 [INFO] [stdout] | [INFO] [stdout] 889 | results[3].0.is_empty() || results[3].0 == "", [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `results[3].0.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/printf.rs:354:33 [INFO] [stdout] | [INFO] [stdout] 354 | if let Some(e_pos) = s.find(|c| c == 'e' || c == 'E') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['e', 'E']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/printf.rs:360:19 [INFO] [stdout] | [INFO] [stdout] 360 | ("-", &rest[1..]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/printf.rs:359:30 [INFO] [stdout] | [INFO] [stdout] 359 | let (sign, digits) = if rest.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 359 ~ let (sign, digits) = if let Some() = rest.strip_prefix('-') { [INFO] [stdout] 360 ~ ("-", ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/printf.rs:362:19 [INFO] [stdout] | [INFO] [stdout] 362 | ("+", &rest[1..]) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/printf.rs:361:16 [INFO] [stdout] | [INFO] [stdout] 361 | } else if rest.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 361 ~ } else if let Some() = rest.strip_prefix('+') { [INFO] [stdout] 362 ~ ("+", ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/printf.rs:428:33 [INFO] [stdout] | [INFO] [stdout] 428 | if let Some(e_pos) = s.find(|c| c == 'e' || c == 'E') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['e', 'E']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/functions/printf.rs:432:13 [INFO] [stdout] | [INFO] [stdout] 432 | &trimmed[..trimmed.len() - 1] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/functions/printf.rs:431:23 [INFO] [stdout] | [INFO] [stdout] 431 | let trimmed = if trimmed.ends_with('.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 431 ~ let trimmed = if let Some() = trimmed.strip_suffix('.') { [INFO] [stdout] 432 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/functions/printf.rs:446:13 [INFO] [stdout] | [INFO] [stdout] 446 | trimmed[..trimmed.len() - 1].to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/functions/printf.rs:445:9 [INFO] [stdout] | [INFO] [stdout] 445 | if trimmed.ends_with('.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 445 ~ if let Some() = trimmed.strip_suffix('.') { [INFO] [stdout] 446 ~ .to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/functions/scalar.rs:727:8 [INFO] [stdout] | [INFO] [stdout] 727 | if x < -1.0 || x > 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-1.0..=1.0).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/functions/scalar.rs:745:8 [INFO] [stdout] | [INFO] [stdout] 745 | if x < -1.0 || x > 1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-1.0..=1.0).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/functions/scalar.rs:2293:17 [INFO] [stdout] | [INFO] [stdout] 2293 | / if node_id != 1 { [INFO] [stdout] 2294 | | if table.get_parent(node_id).is_none() { [INFO] [stdout] 2295 | | errors.push(format!("node {} has no parent", node_id)); [INFO] [stdout] 2296 | | } [INFO] [stdout] 2297 | | } [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] 2293 ~ if node_id != 1 [INFO] [stdout] 2294 ~ && table.get_parent(node_id).is_none() { [INFO] [stdout] 2295 | errors.push(format!("node {} has no parent", node_id)); [INFO] [stdout] 2296 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/scalar.rs:2624:20 [INFO] [stdout] | [INFO] [stdout] 2624 | (true, &s[1..]) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/scalar.rs:2623:32 [INFO] [stdout] | [INFO] [stdout] 2623 | let (is_negative, s) = if s.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 2623 ~ let (is_negative, s) = if let Some() = s.strip_prefix('-') { [INFO] [stdout] 2624 ~ (true, ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/functions/scalar.rs:2626:21 [INFO] [stdout] | [INFO] [stdout] 2626 | (false, &s[1..]) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/functions/scalar.rs:2625:16 [INFO] [stdout] | [INFO] [stdout] 2625 | } else if s.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 2625 ~ } else if let Some() = s.strip_prefix('+') { [INFO] [stdout] 2626 ~ (false, ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/scalar.rs:2630:57 [INFO] [stdout] | [INFO] [stdout] 2630 | let (mantissa, exp) = if let Some(pos) = s.find(|c: char| c == 'e' || c == 'E') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['e', 'E']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/scalar.rs:3005:64 [INFO] [stdout] | [INFO] [stdout] 3005 | let (date_part, time_part) = if let Some(pos) = s.find(|c: char| c == ' ' || c == 'T') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[' ', 'T']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/functions/scalar.rs:3178:19 [INFO] [stdout] | [INFO] [stdout] 3178 | .find(|c: char| c == '(' || c == ' ' || c == '\n' || c == '\r' || c == '\t') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['(', ' ', '\n', '\r', '\t']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser/grammar.rs:1117:56 [INFO] [stdout] | [INFO] [stdout] 1117 | let alias = if self.match_token(TokenKind::As) { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 1118 | | Some(self.expect_identifier()?) [INFO] [stdout] 1119 | | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser/grammar.rs:1119:88 [INFO] [stdout] | [INFO] [stdout] 1119 | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 1120 | | Some(self.expect_identifier()?) [INFO] [stdout] 1121 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser/grammar.rs:1213:56 [INFO] [stdout] | [INFO] [stdout] 1213 | let alias = if self.match_token(TokenKind::As) { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 1214 | | Some(self.expect_identifier()?) [INFO] [stdout] 1215 | | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser/grammar.rs:1215:88 [INFO] [stdout] | [INFO] [stdout] 1215 | } else if self.check(TokenKind::Identifier) && !self.check_keyword_for_alias() { [INFO] [stdout] | ________________________________________________________________________________________^ [INFO] [stdout] 1216 | | Some(self.expect_identifier()?) [INFO] [stdout] 1217 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/grammar.rs:2046:17 [INFO] [stdout] | [INFO] [stdout] 2046 | / ... if insert.table.schema.is_some() { [INFO] [stdout] 2047 | | ... return Err(Error::with_message( [INFO] [stdout] 2048 | | ... ErrorCode::Error, [INFO] [stdout] 2049 | | ... "qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers".to_string(), [INFO] [stdout] 2050 | | ... )); [INFO] [stdout] 2051 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2044 ~ Stmt::Insert(insert) [INFO] [stdout] 2045 | // Qualified table names not allowed [INFO] [stdout] 2046 ~ if insert.table.schema.is_some() => { [INFO] [stdout] 2047 | return Err(Error::with_message( [INFO] [stdout] ... [INFO] [stdout] 2050 | )); [INFO] [stdout] 2051 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/parser/grammar.rs:2144:59 [INFO] [stdout] | [INFO] [stdout] 2144 | } else if self.match_token(TokenKind::Column) { [INFO] [stdout] | ___________________________________________________________^ [INFO] [stdout] 2145 | | let old = self.expect_identifier()?; [INFO] [stdout] 2146 | | self.expect(TokenKind::To)?; [INFO] [stdout] 2147 | | let new = self.expect_identifier()?; [INFO] [stdout] 2148 | | AlterTableAction::RenameColumn { old, new } [INFO] [stdout] 2149 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/parser/grammar.rs:2149:20 [INFO] [stdout] | [INFO] [stdout] 2149 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 2150 | | let old = self.expect_identifier()?; [INFO] [stdout] 2151 | | self.expect(TokenKind::To)?; [INFO] [stdout] 2152 | | let new = self.expect_identifier()?; [INFO] [stdout] 2153 | | AlterTableAction::RenameColumn { old, new } [INFO] [stdout] 2154 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/parser/grammar.rs:2984:20 [INFO] [stdout] | [INFO] [stdout] 2984 | if hex.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `!hex.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/grammar.rs:3426:21 [INFO] [stdout] | [INFO] [stdout] 3426 | / if depth == 0 { [INFO] [stdout] 3427 | | break; [INFO] [stdout] 3428 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 3425 ~ TokenKind::Semicolon | TokenKind::Eof [INFO] [stdout] 3426 ~ if depth == 0 => { [INFO] [stdout] 3427 | break; [INFO] [stdout] 3428 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/parser/resolve.rs:401:9 [INFO] [stdout] | [INFO] [stdout] 401 | ctes: &HashMap, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_ctes` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/parser/resolve.rs:410:55 [INFO] [stdout] | [INFO] [stdout] 410 | self.resolve_table_ref(left, sources, ctes)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] 411 | self.resolve_table_ref(right, sources, ctes)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 420 | self.resolve_table_ref(inner, sources, ctes)?; [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolve.rs:578:21 [INFO] [stdout] | [INFO] [stdout] 578 | / if *idx > 0 { [INFO] [stdout] 579 | | replacement = result_column_expr(result_columns, *idx as usize - 1); [INFO] [stdout] 580 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 577 ~ Expr::Literal(Literal::Integer(idx)) [INFO] [stdout] 578 ~ if *idx > 0 => { [INFO] [stdout] 579 | replacement = result_column_expr(result_columns, *idx as usize - 1); [INFO] [stdout] 580 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/resolve.rs:583:21 [INFO] [stdout] | [INFO] [stdout] 583 | / if col_ref.table.is_none() { [INFO] [stdout] 584 | | if let Some((_, expr)) = entries [INFO] [stdout] 585 | | .iter() [INFO] [stdout] 586 | | .find(|(name, _)| name.eq_ignore_ascii_case(&col_ref.column)) [INFO] [stdout] ... | [INFO] [stdout] 590 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 582 ~ Expr::Column(col_ref) [INFO] [stdout] 583 ~ if col_ref.table.is_none() => { [INFO] [stdout] 584 | if let Some((_, expr)) = entries [INFO] [stdout] ... [INFO] [stdout] 589 | } [INFO] [stdout] 590 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `seed` [INFO] [stdout] --> src/random.rs:129:18 [INFO] [stdout] | [INFO] [stdout] 129 | for i in 0..256 { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 129 - for i in 0..256 { [INFO] [stdout] 129 + for (i, ) in seed.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `Range::contains` implementation [INFO] [stdout] --> src/random.rs:368:21 [INFO] [stdout] | [INFO] [stdout] 368 | assert!(f >= 0.0 && f < 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..1.0).contains(&f)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `point` [INFO] [stdout] --> src/rtree.rs:255:26 [INFO] [stdout] | [INFO] [stdout] 255 | for i in 0..self.n_dim { [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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 255 - for i in 0..self.n_dim { [INFO] [stdout] 255 + for (i, ) in point.iter().enumerate().take(self.n_dim) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/rtree.rs:523:9 [INFO] [stdout] | [INFO] [stdout] 523 | / loop { [INFO] [stdout] 524 | | let parent_id = match self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 525 | | Some(id) => id, [INFO] [stdout] 526 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 537 | | node_id = parent_id; [INFO] [stdout] 538 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 523 ~ while let Some(id) = self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 524 + let parent_id = id; [INFO] [stdout] 525 + .. [INFO] [stdout] 526 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/rtree.rs:546:9 [INFO] [stdout] | [INFO] [stdout] 546 | / loop { [INFO] [stdout] 547 | | let parent_id = match self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 548 | | Some(id) => id, [INFO] [stdout] 549 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 572 | | node_id = parent_id; [INFO] [stdout] 573 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 546 ~ while let Some(id) = self.nodes.get(&node_id).and_then(|node| node.parent) { [INFO] [stdout] 547 + let parent_id = id; [INFO] [stdout] 548 + .. [INFO] [stdout] 549 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_rowid` after checking its variant with `is_some` [INFO] [stdout] --> src/rtree_vtab.rs:394:25 [INFO] [stdout] | [INFO] [stdout] 392 | if rowid.is_none() && new_rowid.is_some() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 393 | // INSERT [INFO] [stdout] 394 | let rowid = new_rowid.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/rtree_vtab.rs:637:8 [INFO] [stdout] | [INFO] [stdout] 637 | if columns.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!columns.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `columns` [INFO] [stdout] --> src/rtree_vtab.rs:652:14 [INFO] [stdout] | [INFO] [stdout] 652 | for i in 1..columns.len() { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 652 - for i in 1..columns.len() { [INFO] [stdout] 652 + for in columns.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/schema/mod.rs:679:38 [INFO] [stdout] | [INFO] [stdout] 679 | if let Some(end_quote) = after_default[1..].find('\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/schema/mod.rs:677:9 [INFO] [stdout] | [INFO] [stdout] 677 | if after_default.starts_with('\'') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 677 ~ if let Some() = after_default.strip_prefix('\'') { [INFO] [stdout] 678 | // String literal [INFO] [stdout] 679 ~ if let Some(end_quote) = .find('\'') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/schema/mod.rs:968:17 [INFO] [stdout] | [INFO] [stdout] 968 | / if let crate::parser::ast::ResultColumn::Expr { expr, .. } = first_col { [INFO] [stdout] 969 | | return Some(ast_expr_to_schema_expr(expr)); [INFO] [stdout] 970 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/schema/mod.rs:967:25 [INFO] [stdout] | [INFO] [stdout] 967 | if let Some(first_col) = body.columns.first() { [INFO] [stdout] | ^^^^^^^^^ replace this binding [INFO] [stdout] 968 | if let crate::parser::ast::ResultColumn::Expr { expr, .. } = first_col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/schema/mod.rs:1332:67 [INFO] [stdout] | [INFO] [stdout] 1332 | let default_value = extract_default_value(&col_def_upper, &col_def); [INFO] [stdout] | ^^^^^^^^ help: change this to: `col_def` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/schema/mod.rs:1362:50 [INFO] [stdout] | [INFO] [stdout] 1362 | let generated = extract_generated_column(&col_def, &col_def_upper); [INFO] [stdout] | ^^^^^^^^ help: change this to: `col_def` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/schema/mod.rs:1400:42 [INFO] [stdout] | [INFO] [stdout] 1400 | for (_col_idx, col) in columns.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1400 - for (_col_idx, col) in columns.iter().enumerate() { [INFO] [stdout] 1400 + for col in columns.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/schema/mod.rs:1715:9 [INFO] [stdout] | [INFO] [stdout] 1715 | &s[1..s.len() - 1].trim() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `s[1..s.len() - 1].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/schema/mod.rs:1844:1 [INFO] [stdout] | [INFO] [stdout] 1844 | / pub enum TriggerStep { [INFO] [stdout] 1845 | | Insert { [INFO] [stdout] 1846 | | table: String, [INFO] [stdout] 1847 | | columns: Option>, [INFO] [stdout] ... | [INFO] [stdout] 1850 | |/ Update { [INFO] [stdout] 1851 | || table: String, [INFO] [stdout] 1852 | || assignments: Vec<(String, Expr)>, [INFO] [stdout] 1853 | || where_clause: Option, [INFO] [stdout] 1854 | || }, [INFO] [stdout] | ||_____- the second-largest variant contains at least 104 bytes [INFO] [stdout] ... | [INFO] [stdout] 1859 | | Select(Select), [INFO] [stdout] | | -------------- the largest variant contains at least 328 bytes [INFO] [stdout] 1860 | | } [INFO] [stdout] | |__^ the entire enum is at least 328 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 1859 - Select(Select), [INFO] [stdout] 1859 + Select(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/schema/mod.rs:2531:24 [INFO] [stdout] | [INFO] [stdout] 2531 | && table.columns.get(pk_indices[0]).map_or(false, |c| { [INFO] [stdout] | ________________________^ [INFO] [stdout] 2532 | | c.affinity == Affinity::Integer [INFO] [stdout] 2533 | | && c.type_name [INFO] [stdout] 2534 | | .as_ref() [INFO] [stdout] 2535 | | .map(|t| t.eq_ignore_ascii_case("INTEGER")) [INFO] [stdout] 2536 | | .unwrap_or(false) [INFO] [stdout] 2537 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 2531 - && table.columns.get(pk_indices[0]).map_or(false, |c| { [INFO] [stdout] 2531 + && table.columns.get(pk_indices[0]).is_some_and(|c| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/schema/mod.rs:2951:21 [INFO] [stdout] | [INFO] [stdout] 2951 | / if *storage == GeneratedStorage::Stored { [INFO] [stdout] 2952 | | has_stored_generated = true; [INFO] [stdout] 2953 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2950 ~ ColumnConstraint::Generated { storage, .. } [INFO] [stdout] 2951 ~ if *storage == GeneratedStorage::Stored => { [INFO] [stdout] 2952 | has_stored_generated = true; [INFO] [stdout] 2953 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/btree/types.rs:177:14 [INFO] [stdout] | [INFO] [stdout] 177 | cmp: Arc std::cmp::Ordering + Send + Sync>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/storage/btree/types.rs:209:1 [INFO] [stdout] | [INFO] [stdout] 209 | / impl Default for CollSeq { [INFO] [stdout] 210 | | fn default() -> Self { [INFO] [stdout] 211 | | CollSeq::Binary [INFO] [stdout] 212 | | } [INFO] [stdout] 213 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 167 + #[derive(Default)] [INFO] [stdout] 168 | pub enum CollSeq { [INFO] [stdout] 169 | /// Binary comparison (memcmp, default) [INFO] [stdout] 170 ~ #[default] [INFO] [stdout] 171 ~ Binary, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/storage/btree/types.rs:221:21 [INFO] [stdout] | [INFO] [stdout] 221 | let al = if (b'A'..=b'Z').contains(&ac) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 221 - let al = if (b'A'..=b'Z').contains(&ac) { [INFO] [stdout] 221 + let al = if ac.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/storage/btree/types.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | let bl = if (b'A'..=b'Z').contains(&bc) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 226 - let bl = if (b'A'..=b'Z').contains(&bc) { [INFO] [stdout] 226 + let bl = if bc.is_ascii_uppercase() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/storage/btree/mod.rs:1466:5 [INFO] [stdout] | [INFO] [stdout] 1466 | (pg_minus_2 % group_size) == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `pg_minus_2.is_multiple_of(group_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/storage/btree/mod.rs:1907:63 [INFO] [stdout] | [INFO] [stdout] 1907 | fn split_leaf_cells(limits: PageLimits, cells: &[Vec]) -> Result<(Vec>, Vec>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual absolute difference pattern without using `abs_diff` [INFO] [stdout] --> src/storage/btree/mod.rs:1932:27 [INFO] [stdout] | [INFO] [stdout] 1932 | let balance = if left_used > right_used { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 1933 | | left_used - right_used [INFO] [stdout] 1934 | | } else { [INFO] [stdout] 1935 | | right_used - left_used [INFO] [stdout] 1936 | | }; [INFO] [stdout] | |_____________^ help: replace with `abs_diff`: `left_used.abs_diff(right_used)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff [INFO] [stdout] = note: `#[warn(clippy::manual_abs_diff)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/storage/btree/mod.rs:2239:1 [INFO] [stdout] | [INFO] [stdout] 2239 | / fn merge_leaf_with_sibling( [INFO] [stdout] 2240 | | shared: &mut BtShared, [INFO] [stdout] 2241 | | parent: &MemPage, [INFO] [stdout] 2242 | | parent_limits: PageLimits, [INFO] [stdout] ... | [INFO] [stdout] 2247 | | cursor_ix: u16, [INFO] [stdout] 2248 | | ) -> Result { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/storage/btree/mod.rs:2848:5 [INFO] [stdout] | [INFO] [stdout] 2848 | info.n_key = n_key as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `storage::btree::CellInfo { n_key: n_key as i64, n_payload: payload_size, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/storage/btree/mod.rs:2847:5 [INFO] [stdout] | [INFO] [stdout] 2847 | let mut info = CellInfo::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/storage/btree/mod.rs:2978:1 [INFO] [stdout] | [INFO] [stdout] 2978 | / fn split_leaf_with_parent( [INFO] [stdout] 2979 | | shared: &mut BtShared, [INFO] [stdout] 2980 | | parent: &MemPage, [INFO] [stdout] 2981 | | parent_limits: PageLimits, [INFO] [stdout] ... | [INFO] [stdout] 2987 | | new_cell: Vec, [INFO] [stdout] 2988 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/storage/btree/mod.rs:3333:54 [INFO] [stdout] | [INFO] [stdout] 3333 | let (payload_size, n1) = if self.is_zerodata { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 3334 | | let (payload, bytes) = read_varint32(&self.data, cursor)?; [INFO] [stdout] 3335 | | (payload, bytes) [INFO] [stdout] 3336 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/storage/btree/mod.rs:3336:16 [INFO] [stdout] | [INFO] [stdout] 3336 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 3337 | | let (payload, bytes) = read_varint32(&self.data, cursor)?; [INFO] [stdout] 3338 | | (payload, bytes) [INFO] [stdout] 3339 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/storage/btree/mod.rs:3517:34 [INFO] [stdout] | [INFO] [stdout] 3517 | let cell_content_start = self.cell_content_offset(limits).ok()? as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.cell_content_offset(limits).ok()?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:3847:27 [INFO] [stdout] | [INFO] [stdout] 3847 | return Ok(Arc::new(Btree { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 3848 | | db, [INFO] [stdout] 3849 | | shared, [INFO] [stdout] 3850 | | in_trans: AtomicU8::new(TransState::None as u8), [INFO] [stdout] ... | [INFO] [stdout] 3858 | | prev: None, [INFO] [stdout] 3859 | | })); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:3978:22 [INFO] [stdout] | [INFO] [stdout] 3978 | let shared = Arc::new(RwLock::new(shared)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>` is not `Send` and `Sync` as `RwLock` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RwLock` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:3983:12 [INFO] [stdout] | [INFO] [stdout] 3983 | Ok(Arc::new(Btree { [INFO] [stdout] | ____________^ [INFO] [stdout] 3984 | | db, [INFO] [stdout] 3985 | | shared, [INFO] [stdout] 3986 | | in_trans: AtomicU8::new(TransState::None as u8), [INFO] [stdout] ... | [INFO] [stdout] 3994 | | prev: None, [INFO] [stdout] 3995 | | })) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/storage/btree/mod.rs:4428:52 [INFO] [stdout] | [INFO] [stdout] 4428 | if _cursor.state != CursorState::Valid { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 4429 | | need_seek = true; [INFO] [stdout] 4430 | | } else if _cursor.cursor_data_version != shared_guard.shared_data_version { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/storage/btree/mod.rs:4430:87 [INFO] [stdout] | [INFO] [stdout] 4430 | } else if _cursor.cursor_data_version != shared_guard.shared_data_version { [INFO] [stdout] | _______________________________________________________________________________________^ [INFO] [stdout] 4431 | | need_seek = true; [INFO] [stdout] 4432 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/storage/btree/mod.rs:6816:21 [INFO] [stdout] | [INFO] [stdout] 6816 | assert!(size >= MIN_PAGE_SIZE && size <= MAX_PAGE_SIZE); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(MIN_PAGE_SIZE..=MAX_PAGE_SIZE).contains(&size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:6963:21 [INFO] [stdout] | [INFO] [stdout] 6963 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:6984:21 [INFO] [stdout] | [INFO] [stdout] 6984 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7004:21 [INFO] [stdout] | [INFO] [stdout] 7004 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7023:21 [INFO] [stdout] | [INFO] [stdout] 7023 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7047:21 [INFO] [stdout] | [INFO] [stdout] 7047 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7175:21 [INFO] [stdout] | [INFO] [stdout] 7175 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7195:21 [INFO] [stdout] | [INFO] [stdout] 7195 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7233:21 [INFO] [stdout] | [INFO] [stdout] 7233 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7266:21 [INFO] [stdout] | [INFO] [stdout] 7266 | let btree = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7445:25 [INFO] [stdout] | [INFO] [stdout] 7445 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/storage/btree/mod.rs:7484:19 [INFO] [stdout] | [INFO] [stdout] 7484 | } else if value >= -128 && value <= 127 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-128..=127).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/storage/btree/mod.rs:7486:19 [INFO] [stdout] | [INFO] [stdout] 7486 | } else if value >= -32768 && value <= 32767 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-32768..=32767).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/storage/btree/mod.rs:7488:19 [INFO] [stdout] | [INFO] [stdout] 7488 | } else if value >= -2147483648 && value <= 2147483647 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-2147483648..=2147483647).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/storage/btree/mod.rs:7532:31 [INFO] [stdout] | [INFO] [stdout] 7532 | } else if v >= -128 && v <= 127 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-128..=127).contains(&v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7790:25 [INFO] [stdout] | [INFO] [stdout] 7790 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7818:25 [INFO] [stdout] | [INFO] [stdout] 7818 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7841:25 [INFO] [stdout] | [INFO] [stdout] 7841 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7866:25 [INFO] [stdout] | [INFO] [stdout] 7866 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7893:25 [INFO] [stdout] | [INFO] [stdout] 7893 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7932:25 [INFO] [stdout] | [INFO] [stdout] 7932 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7944:25 [INFO] [stdout] | [INFO] [stdout] 7944 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7964:25 [INFO] [stdout] | [INFO] [stdout] 7964 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7980:25 [INFO] [stdout] | [INFO] [stdout] 7980 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:7995:25 [INFO] [stdout] | [INFO] [stdout] 7995 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8014:25 [INFO] [stdout] | [INFO] [stdout] 8014 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8035:25 [INFO] [stdout] | [INFO] [stdout] 8035 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8063:25 [INFO] [stdout] | [INFO] [stdout] 8063 | let btree_arc = Arc::new(btree); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/storage/btree/mod.rs:8367:9 [INFO] [stdout] | [INFO] [stdout] 8367 | assert_eq!(btree.incr_vacuum().unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 8367 - assert_eq!(btree.incr_vacuum().unwrap(), false); [INFO] [stdout] 8367 + assert!(!btree.incr_vacuum().unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8486:25 [INFO] [stdout] | [INFO] [stdout] 8486 | let btree_arc = Arc::new(unwrap_arc(btree)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8520:25 [INFO] [stdout] | [INFO] [stdout] 8520 | let btree_arc = Arc::new(unwrap_arc(btree)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8559:25 [INFO] [stdout] | [INFO] [stdout] 8559 | let btree_arc = Arc::new(unwrap_arc(btree)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8589:25 [INFO] [stdout] | [INFO] [stdout] 8589 | let btree_arc = Arc::new(unwrap_arc(btree)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8630:25 [INFO] [stdout] | [INFO] [stdout] 8630 | let btree_arc = Arc::new(unwrap_arc(btree)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/storage/btree/mod.rs:8678:25 [INFO] [stdout] | [INFO] [stdout] 8678 | let btree_arc = Arc::new(unwrap_arc(btree)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `Btree` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `Btree` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.wal` after checking its variant with `is_some` [INFO] [stdout] --> src/storage/pager.rs:857:39 [INFO] [stdout] | [INFO] [stdout] 854 | if self.wal.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = &self.wal` [WARN] too many lines in the log, truncating it