[INFO] cloning repository https://github.com/Bas3L3ss/rust-sqlite-clone [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Bas3L3ss/rust-sqlite-clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBas3L3ss%2Frust-sqlite-clone", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBas3L3ss%2Frust-sqlite-clone'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6c9585ac5234c7176e5a15a9b3926c7914946c57 [INFO] linting Bas3L3ss/rust-sqlite-clone against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBas3L3ss%2Frust-sqlite-clone" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Bas3L3ss/rust-sqlite-clone [INFO] finished tweaking git repo https://github.com/Bas3L3ss/rust-sqlite-clone [INFO] tweaked toml for git repo https://github.com/Bas3L3ss/rust-sqlite-clone written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Bas3L3ss/rust-sqlite-clone 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/Bas3L3ss/rust-sqlite-clone already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded recursive v0.1.1 [INFO] [stderr] Downloaded recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Downloaded sqlparser v0.58.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 72e6196ed41a30e81cd512c66021987d3a1bf126badc2bbef3390b502b25ab9d [INFO] running `Command { std: "docker" "start" "-a" "72e6196ed41a30e81cd512c66021987d3a1bf126badc2bbef3390b502b25ab9d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "72e6196ed41a30e81cd512c66021987d3a1bf126badc2bbef3390b502b25ab9d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "72e6196ed41a30e81cd512c66021987d3a1bf126badc2bbef3390b502b25ab9d", kill_on_drop: false }` [INFO] [stdout] 72e6196ed41a30e81cd512c66021987d3a1bf126badc2bbef3390b502b25ab9d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] a9a8075300d29915e9ef5c45529bfd61b858af3c86f57bcf52086197142b9724 [INFO] running `Command { std: "docker" "start" "-a" "a9a8075300d29915e9ef5c45529bfd61b858af3c86f57bcf52086197142b9724", kill_on_drop: false }` [INFO] [stderr] Compiling cc v1.2.30 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling syn v2.0.75 [INFO] [stderr] Checking memmap2 v0.9.7 [INFO] [stderr] Compiling psm v0.1.26 [INFO] [stderr] Compiling stacker v0.1.21 [INFO] [stderr] Compiling recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Checking recursive v0.1.1 [INFO] [stderr] Checking sqlparser v0.58.0 [INFO] [stderr] Checking codecrafters-sqlite v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/cell_structs/interior_table_cell.rs:17:30 [INFO] [stdout] | [INFO] [stdout] 17 | let left_child_ptr = u32::from_be_bytes([ [INFO] [stdout] | ______________________________^ [INFO] [stdout] 18 | | left_child_ptr_bytes[0], [INFO] [stdout] 19 | | left_child_ptr_bytes[1], [INFO] [stdout] 20 | | left_child_ptr_bytes[2], [INFO] [stdout] 21 | | left_child_ptr_bytes[3], [INFO] [stdout] 22 | | ]) as u32; [INFO] [stdout] | |_________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 17 ~ let left_child_ptr = u32::from_be_bytes([ [INFO] [stdout] 18 + left_child_ptr_bytes[0], [INFO] [stdout] 19 + left_child_ptr_bytes[1], [INFO] [stdout] 20 + left_child_ptr_bytes[2], [INFO] [stdout] 21 + left_child_ptr_bytes[3], [INFO] [stdout] 22 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cell_structs/leaf_table_cell.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | target_rowids: &Vec, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 - target_rowids: &Vec, [INFO] [stdout] 26 + target_rowids: &[u64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cell_structs/leaf_table_cell.rs:85:17 [INFO] [stdout] | [INFO] [stdout] 85 | / if name != "*" && !columns.iter().any(|(col, _, _)| col == name) { [INFO] [stdout] 86 | | if name != "rowid" { [INFO] [stdout] 87 | | bail!("Column '{}' not found in table columns", name); [INFO] [stdout] 88 | | } [INFO] [stdout] 89 | | } [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] 85 ~ if name != "*" && !columns.iter().any(|(col, _, _)| col == name) [INFO] [stdout] 86 ~ && name != "rowid" { [INFO] [stdout] 87 | bail!("Column '{}' not found in table columns", name); [INFO] [stdout] 88 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/query_structs/select_query.rs:65:21 [INFO] [stdout] | [INFO] [stdout] 65 | / if let Expr::Identifier(_ident) = expr { [INFO] [stdout] 66 | | selected_col_names.push(alias.value.clone()); [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/query_structs/select_query.rs:64:45 [INFO] [stdout] | [INFO] [stdout] 64 | SelectItem::ExprWithAlias { expr, alias } => { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 65 | if let Expr::Identifier(_ident) = 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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/query_structs/select_query.rs:328:17 [INFO] [stdout] | [INFO] [stdout] 328 | / if !col_names.contains(&ident.value) { [INFO] [stdout] 329 | | col_names.push(ident.value.clone()); [INFO] [stdout] 330 | | } [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] 327 ~ Identifier(ident) [INFO] [stdout] 328 ~ if !col_names.contains(&ident.value) => { [INFO] [stdout] 329 | col_names.push(ident.value.clone()); [INFO] [stdout] 330 ~ } [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/structs/command.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn from_str(cmd: &str) -> Option { [INFO] [stdout] 24 | | match cmd { [INFO] [stdout] 25 | | ".dbinfo" => Some(Command::DotDbInfo), [INFO] [stdout] 26 | | ".tables" => Some(Command::DotTables), [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [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] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `DatabaseHeader::from_file` doesn't need a mutable reference [INFO] [stdout] --> src/structs/command.rs:33:48 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 33 - let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] 33 + let header = DatabaseHeader::from_file(&(&file_map[..100]).as_ref())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/structs/command.rs:33:53 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&file_map[..100])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:33:48 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&file_map[..100]).as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/structs/command.rs:33:53 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `file_map[..100]` [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/structs/command.rs:37:39 [INFO] [stdout] | [INFO] [stdout] 37 | let table = Table::from_bytes(&page1, 0); [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/structs/command.rs:60:46 [INFO] [stdout] | [INFO] [stdout] 60 | let schema_cells = read_schema_cells(&page1, &table, file_map)?; [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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: the function `DatabaseHeader::from_file` doesn't need a mutable reference [INFO] [stdout] --> src/structs/command.rs:104:48 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 104 - let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] 104 + let header = DatabaseHeader::from_file(&(&file_map[..100]).as_ref())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/structs/command.rs:104:53 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&file_map[..100])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:104:48 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&file_map[..100]).as_ref()` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/structs/command.rs:104:53 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `file_map[..100]` [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/structs/command.rs:108:39 [INFO] [stdout] | [INFO] [stdout] 108 | let table = Table::from_bytes(&page1, 0); [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/structs/command.rs:110:46 [INFO] [stdout] | [INFO] [stdout] 110 | let schema_cells = read_schema_cells(&page1, &table, file_map)?; [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/cell_structs/interior_table_cell.rs:17:30 [INFO] [stdout] | [INFO] [stdout] 17 | let left_child_ptr = u32::from_be_bytes([ [INFO] [stdout] | ______________________________^ [INFO] [stdout] 18 | | left_child_ptr_bytes[0], [INFO] [stdout] 19 | | left_child_ptr_bytes[1], [INFO] [stdout] 20 | | left_child_ptr_bytes[2], [INFO] [stdout] 21 | | left_child_ptr_bytes[3], [INFO] [stdout] 22 | | ]) as u32; [INFO] [stdout] | |_________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 17 ~ let left_child_ptr = u32::from_be_bytes([ [INFO] [stdout] 18 + left_child_ptr_bytes[0], [INFO] [stdout] 19 + left_child_ptr_bytes[1], [INFO] [stdout] 20 + left_child_ptr_bytes[2], [INFO] [stdout] 21 + left_child_ptr_bytes[3], [INFO] [stdout] 22 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `DatabaseHeader::from_file` doesn't need a mutable reference [INFO] [stdout] --> src/structs/command.rs:138:48 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 138 - let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] 138 + let header = DatabaseHeader::from_file(&(&file_map[..100]).as_ref())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/structs/command.rs:138:53 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&file_map[..100])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:138:48 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&file_map[..100]).as_ref()` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/structs/command.rs:138:53 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `file_map[..100]` [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/structs/command.rs:142:39 [INFO] [stdout] | [INFO] [stdout] 142 | let table = Table::from_bytes(&page1, 0); [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/structs/command.rs:151:62 [INFO] [stdout] | [INFO] [stdout] 151 | let sql_schema_cells = read_schema_cells(&page1, &table, file_map)?; [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/structs/command.rs:224:56 [INFO] [stdout] | [INFO] [stdout] 224 | let root_table = Table::from_bytes(&root_page, rootpage_ptr); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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/structs/command.rs:228:29 [INFO] [stdout] | [INFO] [stdout] 228 | ... &root_page, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/structs/command.rs:231:29 [INFO] [stdout] | [INFO] [stdout] 231 | ... header.page_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `header.page_size` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:237:29 [INFO] [stdout] | [INFO] [stdout] 237 | ... &root_page, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/structs/command.rs:240:29 [INFO] [stdout] | [INFO] [stdout] 240 | ... header.page_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `header.page_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cell_structs/leaf_table_cell.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | target_rowids: &Vec, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 - target_rowids: &Vec, [INFO] [stdout] 26 + target_rowids: &[u64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cell_structs/leaf_table_cell.rs:85:17 [INFO] [stdout] | [INFO] [stdout] 85 | / if name != "*" && !columns.iter().any(|(col, _, _)| col == name) { [INFO] [stdout] 86 | | if name != "rowid" { [INFO] [stdout] 87 | | bail!("Column '{}' not found in table columns", name); [INFO] [stdout] 88 | | } [INFO] [stdout] 89 | | } [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] 85 ~ if name != "*" && !columns.iter().any(|(col, _, _)| col == name) [INFO] [stdout] 86 ~ && name != "rowid" { [INFO] [stdout] 87 | bail!("Column '{}' not found in table columns", name); [INFO] [stdout] 88 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/table.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [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/structs/table.rs:111:29 [INFO] [stdout] | [INFO] [stdout] 111 | ... &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/structs/table.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn index_scan( [INFO] [stdout] 129 | | &self, [INFO] [stdout] 130 | | file_map: &Mmap, [INFO] [stdout] 131 | | page_buf: &[u8], [INFO] [stdout] ... | [INFO] [stdout] 136 | | target_rowids: Vec, [INFO] [stdout] 137 | | ) -> 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] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/table.rs:147:25 [INFO] [stdout] | [INFO] [stdout] 147 | &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [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 `if let` can be collapsed into the outer `match` [INFO] [stdout] --> src/query_structs/select_query.rs:65:21 [INFO] [stdout] | [INFO] [stdout] 65 | / if let Expr::Identifier(_ident) = expr { [INFO] [stdout] 66 | | selected_col_names.push(alias.value.clone()); [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/query_structs/select_query.rs:64:45 [INFO] [stdout] | [INFO] [stdout] 64 | SelectItem::ExprWithAlias { expr, alias } => { [INFO] [stdout] | ^^^^ replace this binding [INFO] [stdout] 65 | if let Expr::Identifier(_ident) = 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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/table.rs:181:29 [INFO] [stdout] | [INFO] [stdout] 181 | ... &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs/where_evaluator.rs:253:39 [INFO] [stdout] | [INFO] [stdout] 253 | let is_not_null = !v.downcast_ref::<()>().is_some(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `v.downcast_ref::<()>().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: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/query_structs/select_query.rs:328:17 [INFO] [stdout] | [INFO] [stdout] 328 | / if !col_names.contains(&ident.value) { [INFO] [stdout] 329 | | col_names.push(ident.value.clone()); [INFO] [stdout] 330 | | } [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] 327 ~ Identifier(ident) [INFO] [stdout] 328 ~ if !col_names.contains(&ident.value) => { [INFO] [stdout] 329 | col_names.push(ident.value.clone()); [INFO] [stdout] 330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/structs/command.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn from_str(cmd: &str) -> Option { [INFO] [stdout] 24 | | match cmd { [INFO] [stdout] 25 | | ".dbinfo" => Some(Command::DotDbInfo), [INFO] [stdout] 26 | | ".tables" => Some(Command::DotTables), [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [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] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `DatabaseHeader::from_file` doesn't need a mutable reference [INFO] [stdout] --> src/structs/command.rs:33:48 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 33 - let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] 33 + let header = DatabaseHeader::from_file(&(&file_map[..100]).as_ref())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/structs/command.rs:33:53 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&file_map[..100])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:33:48 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&file_map[..100]).as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/structs/command.rs:33:53 [INFO] [stdout] | [INFO] [stdout] 33 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `file_map[..100]` [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/structs/command.rs:37:39 [INFO] [stdout] | [INFO] [stdout] 37 | let table = Table::from_bytes(&page1, 0); [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/utils/get_target_rowids.rs:125:52 [INFO] [stdout] | [INFO] [stdout] 125 | let root_table = Table::from_bytes(&root_page, rootpage_ptr); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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/structs/command.rs:60:46 [INFO] [stdout] | [INFO] [stdout] 60 | let schema_cells = read_schema_cells(&page1, &table, file_map)?; [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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: the function `DatabaseHeader::from_file` doesn't need a mutable reference [INFO] [stdout] --> src/structs/command.rs:104:48 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 104 - let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] 104 + let header = DatabaseHeader::from_file(&(&file_map[..100]).as_ref())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/structs/command.rs:104:53 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&file_map[..100])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:104:48 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&file_map[..100]).as_ref()` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/structs/command.rs:104:53 [INFO] [stdout] | [INFO] [stdout] 104 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `file_map[..100]` [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/structs/command.rs:108:39 [INFO] [stdout] | [INFO] [stdout] 108 | let table = Table::from_bytes(&page1, 0); [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/structs/command.rs:110:46 [INFO] [stdout] | [INFO] [stdout] 110 | let schema_cells = read_schema_cells(&page1, &table, file_map)?; [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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: the function `DatabaseHeader::from_file` doesn't need a mutable reference [INFO] [stdout] --> src/structs/command.rs:138:48 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 138 - let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] 138 + let header = DatabaseHeader::from_file(&(&file_map[..100]).as_ref())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/structs/command.rs:138:53 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&file_map[..100])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:138:48 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&file_map[..100]).as_ref()` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/structs/command.rs:138:53 [INFO] [stdout] | [INFO] [stdout] 138 | let header = DatabaseHeader::from_file(&mut (&file_map[..100]).as_ref())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `file_map[..100]` [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: accessing first element with `create_index.columns.get(0)` [INFO] [stdout] --> src/utils/parse_index_create_sql.rs:14:38 [INFO] [stdout] | [INFO] [stdout] 14 | if let Some(first_col) = create_index.columns.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `create_index.columns.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:142:39 [INFO] [stdout] | [INFO] [stdout] 142 | let table = Table::from_bytes(&page1, 0); [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/structs/command.rs:151:62 [INFO] [stdout] | [INFO] [stdout] 151 | let sql_schema_cells = read_schema_cells(&page1, &table, file_map)?; [INFO] [stdout] | ^^^^^^ help: change this to: `page1` [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/utils/traverse_all_index_leaves.rs:27:35 [INFO] [stdout] | [INFO] [stdout] 27 | let table = Table::from_bytes(&page_buf, page_num); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `page_buf` [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/structs/command.rs:224:56 [INFO] [stdout] | [INFO] [stdout] 224 | let root_table = Table::from_bytes(&root_page, rootpage_ptr); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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/structs/command.rs:228:29 [INFO] [stdout] | [INFO] [stdout] 228 | ... &root_page, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/structs/command.rs:231:29 [INFO] [stdout] | [INFO] [stdout] 231 | ... header.page_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `header.page_size` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/command.rs:237:29 [INFO] [stdout] | [INFO] [stdout] 237 | ... &root_page, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/structs/command.rs:240:29 [INFO] [stdout] | [INFO] [stdout] 240 | ... header.page_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `header.page_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/traverse_all_tables.rs:29:35 [INFO] [stdout] | [INFO] [stdout] 29 | let table = Table::from_bytes(&page_buf, page_num); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `page_buf` [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/utils/traverse_all_tables.rs:67:35 [INFO] [stdout] | [INFO] [stdout] 67 | let table = Table::from_bytes(&page_buf, page_num); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `page_buf` [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/structs/table.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [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/structs/table.rs:111:29 [INFO] [stdout] | [INFO] [stdout] 111 | ... &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/structs/table.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn index_scan( [INFO] [stdout] 129 | | &self, [INFO] [stdout] 130 | | file_map: &Mmap, [INFO] [stdout] 131 | | page_buf: &[u8], [INFO] [stdout] ... | [INFO] [stdout] 136 | | target_rowids: Vec, [INFO] [stdout] 137 | | ) -> 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] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs/table.rs:147:25 [INFO] [stdout] | [INFO] [stdout] 147 | &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [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/structs/table.rs:181:29 [INFO] [stdout] | [INFO] [stdout] 181 | ... &cols, [INFO] [stdout] | ^^^^^ help: change this to: `cols` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs/where_evaluator.rs:253:39 [INFO] [stdout] | [INFO] [stdout] 253 | let is_not_null = !v.downcast_ref::<()>().is_some(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `v.downcast_ref::<()>().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: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f32` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `bool` which implements the `Copy` trait [INFO] [stdout] --> src/utils/clone_box_any.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | Box::new(v.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/get_target_rowids.rs:125:52 [INFO] [stdout] | [INFO] [stdout] 125 | let root_table = Table::from_bytes(&root_page, rootpage_ptr); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `root_page` [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: accessing first element with `create_index.columns.get(0)` [INFO] [stdout] --> src/utils/parse_index_create_sql.rs:14:38 [INFO] [stdout] | [INFO] [stdout] 14 | if let Some(first_col) = create_index.columns.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `create_index.columns.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils/traverse_all_index_leaves.rs:27:35 [INFO] [stdout] | [INFO] [stdout] 27 | let table = Table::from_bytes(&page_buf, page_num); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `page_buf` [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/utils/traverse_all_tables.rs:29:35 [INFO] [stdout] | [INFO] [stdout] 29 | let table = Table::from_bytes(&page_buf, page_num); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `page_buf` [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/utils/traverse_all_tables.rs:67:35 [INFO] [stdout] | [INFO] [stdout] 67 | let table = Table::from_bytes(&page_buf, page_num); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `page_buf` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.20s [INFO] running `Command { std: "docker" "inspect" "a9a8075300d29915e9ef5c45529bfd61b858af3c86f57bcf52086197142b9724", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a9a8075300d29915e9ef5c45529bfd61b858af3c86f57bcf52086197142b9724", kill_on_drop: false }` [INFO] [stdout] a9a8075300d29915e9ef5c45529bfd61b858af3c86f57bcf52086197142b9724