[INFO] cloning repository https://github.com/Xestus/ASMT [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Xestus/ASMT" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXestus%2FASMT", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXestus%2FASMT'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4a3b775ad2a37a1fd044916ddbf41ac1a343e7d8 [INFO] linting Xestus/ASMT against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXestus%2FASMT" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Xestus/ASMT [INFO] finished tweaking git repo https://github.com/Xestus/ASMT [INFO] tweaked toml for git repo https://github.com/Xestus/ASMT written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Xestus/ASMT 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/Xestus/ASMT 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-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 260e1ad068f40cc51444656328aabdee2cbb982e38c6062da697571c820ac0ad [INFO] running `Command { std: "docker" "start" "-a" "260e1ad068f40cc51444656328aabdee2cbb982e38c6062da697571c820ac0ad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "260e1ad068f40cc51444656328aabdee2cbb982e38c6062da697571c820ac0ad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "260e1ad068f40cc51444656328aabdee2cbb982e38c6062da697571c820ac0ad", kill_on_drop: false }` [INFO] [stdout] 260e1ad068f40cc51444656328aabdee2cbb982e38c6062da697571c820ac0ad [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 766204d0329c001debd8044e24a38bdf8b3882142c86814ff076dd3176b7ecda [INFO] running `Command { std: "docker" "start" "-a" "766204d0329c001debd8044e24a38bdf8b3882142c86814ff076dd3176b7ecda", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.104 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling crc32c v0.6.8 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Compiling syn v2.0.113 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking ASMT v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/storage/deser/raw.rs:9:75 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn get_serialized_file_data(serialized_file_path: &str) -> io::Result<(Vec)> { [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] 9 - pub fn get_serialized_file_data(serialized_file_path: &str) -> io::Result<(Vec)> { [INFO] [stdout] 9 + pub fn get_serialized_file_data(serialized_file_path: &str) -> io::Result> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/storage/deser/raw.rs:9:75 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn get_serialized_file_data(serialized_file_path: &str) -> io::Result<(Vec)> { [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] 9 - pub fn get_serialized_file_data(serialized_file_path: &str) -> io::Result<(Vec)> { [INFO] [stdout] 9 + pub fn get_serialized_file_data(serialized_file_path: &str) -> io::Result> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/storage/wal/writer.rs:1:32 [INFO] [stdout] | [INFO] [stdout] 1 | use std::io::{BufWriter, Seek, Write}; [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: `Write` [INFO] [stdout] --> src/storage/wal/writer.rs:1:32 [INFO] [stdout] | [INFO] [stdout] 1 | use std::io::{BufWriter, Seek, Write}; [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: `Serialize` [INFO] [stdout] --> src/storage/wal/writer.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | use serde::{Serialize}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Serialize` [INFO] [stdout] --> src/storage/wal/writer.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | use serde::{Serialize}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::io::empty_file` [INFO] [stdout] --> src/engine/checkpoint.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::storage::io::empty_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::wal::reader::get_uncommitted_transactions` [INFO] [stdout] --> src/engine/checkpoint.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::storage::wal::reader::get_uncommitted_transactions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::io::empty_file` [INFO] [stdout] --> src/engine/checkpoint.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::storage::io::empty_file; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::storage::wal::reader::get_uncommitted_transactions` [INFO] [stdout] --> src/engine/checkpoint.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::storage::wal::reader::get_uncommitted_transactions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `RwLock` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | use std::sync::{Arc, RwLock}; [INFO] [stdout] | ^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `RwLock` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:1:17 [INFO] [stdout] | [INFO] [stdout] 1 | use std::sync::{Arc, RwLock}; [INFO] [stdout] | ^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::btree::node::Node` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::btree::node::Node; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::NODE_SIZE` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::NODE_SIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `TransactionStatus` and `Transaction` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:4:41 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::transactions::transactions::{Transaction, TransactionStatus}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::btree::node::Node` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::btree::node::Node; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::NODE_SIZE` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::NODE_SIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `TransactionStatus` and `Transaction` [INFO] [stdout] --> src/transaction_process_tree_fix.rs:4:41 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::transactions::transactions::{Transaction, TransactionStatus}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/deser/parse.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let mut internal_count_activate = true; [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `internal_count` is assigned to, but never used [INFO] [stdout] --> src/storage/deser/parse.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut internal_count = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_internal_count` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `no_of_children` is never read [INFO] [stdout] --> src/storage/deser/parse.rs:22:30 [INFO] [stdout] | [INFO] [stdout] 22 | let mut no_of_children = 0; [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 `internal_count` is never read [INFO] [stdout] --> src/storage/deser/parse.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | internal_count = count; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/deser/parse.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | let mut z; [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/deser/parse.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let mut internal_count_activate = true; [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `internal_count` is assigned to, but never used [INFO] [stdout] --> src/storage/deser/parse.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut internal_count = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_internal_count` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `no_of_children` is never read [INFO] [stdout] --> src/storage/deser/parse.rs:22:30 [INFO] [stdout] | [INFO] [stdout] 22 | let mut no_of_children = 0; [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 `internal_count` is never read [INFO] [stdout] --> src/storage/deser/parse.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | internal_count = count; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/storage/deser/parse.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | let mut z; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `messages` is never read [INFO] [stdout] --> src/cli/cli.rs:397:39 [INFO] [stdout] | [INFO] [stdout] 397 | let mut messages= String::new(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `wal_file_path` [INFO] [stdout] --> src/engine/checkpoint.rs:16:72 [INFO] [stdout] | [INFO] [stdout] 16 | ...d_file_path: &str, wal_file_path: &str, file: Arc>, all_addr: Arc>>, transaction: Arc src/engine/checkpoint.rs:16:93 [INFO] [stdout] | [INFO] [stdout] 16 | ... &str, wal_file_path: &str, file: Arc>, all_addr: Arc>>, transaction: Arc... [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `messages` is never read [INFO] [stdout] --> src/cli/cli.rs:397:39 [INFO] [stdout] | [INFO] [stdout] 397 | let mut messages= String::new(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `wal_file_path` [INFO] [stdout] --> src/engine/checkpoint.rs:16:72 [INFO] [stdout] | [INFO] [stdout] 16 | ...d_file_path: &str, wal_file_path: &str, file: Arc>, all_addr: Arc>>, transaction: Arc src/engine/checkpoint.rs:16:93 [INFO] [stdout] | [INFO] [stdout] 16 | ... &str, wal_file_path: &str, file: Arc>, all_addr: Arc>>, transaction: Arc... [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/MVCC/gc.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 43 - return true; [INFO] [stdout] 43 + true [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/MVCC/visibility.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | / match fetch_items_for_key(node, k) { [INFO] [stdout] 11 | | Some(items) => { [INFO] [stdout] 12 | | result = items.version; [INFO] [stdout] ... | [INFO] [stdout] 15 | | } [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] 10 ~ if let Some(items) = fetch_items_for_key(node, k) { [INFO] [stdout] 11 + result = items.version; [INFO] [stdout] 12 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `result` [INFO] [stdout] --> src/MVCC/visibility.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | for i in 0..result.iter().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 [INFO] [stdout] | [INFO] [stdout] 22 - for i in 0..result.iter().len() { [INFO] [stdout] 22 + for in result.iter().take(result.iter().len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/MVCC/visibility.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | / if let Some(result_xmax_now) = result_max { [INFO] [stdout] 31 | | if result_min == result_xmax_now { [INFO] [stdout] 32 | | continue; [INFO] [stdout] 33 | | } [INFO] [stdout] 34 | | } [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] 30 ~ if let Some(result_xmax_now) = result_max [INFO] [stdout] 31 ~ && result_min == result_xmax_now { [INFO] [stdout] 32 | continue; [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/MVCC/visibility.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | } else if let Some(max_temp_status) = max_status { [INFO] [stdout] | ________________________^ [INFO] [stdout] 53 | | if let TransactionStatus::Active = max_temp_status.status{ [INFO] [stdout] 54 | | visible_xmax = true; [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 52 ~ } else if let Some(max_temp_status) = max_status [INFO] [stdout] 53 ~ && let TransactionStatus::Active = max_temp_status.status{ [INFO] [stdout] 54 | visible_xmax = true; [INFO] [stdout] 55 | // visible -- xmax == ACTIVE [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/MVCC/gc.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 43 - return true; [INFO] [stdout] 43 + true [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/MVCC/visibility.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | / match fetch_items_for_key(node, k) { [INFO] [stdout] 11 | | Some(items) => { [INFO] [stdout] 12 | | result = items.version; [INFO] [stdout] ... | [INFO] [stdout] 15 | | } [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] 10 ~ if let Some(items) = fetch_items_for_key(node, k) { [INFO] [stdout] 11 + result = items.version; [INFO] [stdout] 12 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `ver_read_guard` [INFO] [stdout] --> src/MVCC/visibility.rs:217:18 [INFO] [stdout] | [INFO] [stdout] 217 | for i in 0..ver_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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 217 - for i in 0..ver_len { [INFO] [stdout] 217 + for (i, ) in ver_read_guard.iter().enumerate().take(ver_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `result` [INFO] [stdout] --> src/MVCC/visibility.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | for i in 0..result.iter().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 [INFO] [stdout] | [INFO] [stdout] 22 - for i in 0..result.iter().len() { [INFO] [stdout] 22 + for in result.iter().take(result.iter().len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/MVCC/visibility.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | / if let Some(result_xmax_now) = result_max { [INFO] [stdout] 31 | | if result_min == result_xmax_now { [INFO] [stdout] 32 | | continue; [INFO] [stdout] 33 | | } [INFO] [stdout] 34 | | } [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] 30 ~ if let Some(result_xmax_now) = result_max [INFO] [stdout] 31 ~ && result_min == result_xmax_now { [INFO] [stdout] 32 | continue; [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `ver_read_guard` [INFO] [stdout] --> src/MVCC/visibility.rs:248:18 [INFO] [stdout] | [INFO] [stdout] 248 | for i in 0..ver_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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 248 - for i in 0..ver_len { [INFO] [stdout] 248 + for (i, ) in ver_read_guard.iter().enumerate().take(ver_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/MVCC/visibility.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | } else if let Some(max_temp_status) = max_status { [INFO] [stdout] | ________________________^ [INFO] [stdout] 53 | | if let TransactionStatus::Active = max_temp_status.status{ [INFO] [stdout] 54 | | visible_xmax = true; [INFO] [stdout] ... | [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 52 ~ } else if let Some(max_temp_status) = max_status [INFO] [stdout] 53 ~ && let TransactionStatus::Active = max_temp_status.status{ [INFO] [stdout] 54 | visible_xmax = true; [INFO] [stdout] 55 | // visible -- xmax == ACTIVE [INFO] [stdout] 56 ~ } [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/MVCC/visibility.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | / match transaction.read().unwrap().items.get(&i){ [INFO] [stdout] 278 | | Some(item) => { [INFO] [stdout] 279 | | let x = &item.modified_keys; [INFO] [stdout] ... | [INFO] [stdout] 285 | | None => { } [INFO] [stdout] 286 | | } [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] 277 ~ if let Some(item) = transaction.read().unwrap().items.get(&i) { [INFO] [stdout] 278 + let x = &item.modified_keys; [INFO] [stdout] 279 + [INFO] [stdout] 280 + for j in x.iter() { [INFO] [stdout] 281 + if *j == new_key { return true; } [INFO] [stdout] 282 + } [INFO] [stdout] 283 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/MVCC/visibility.rs:291:95 [INFO] [stdout] | [INFO] [stdout] 291 | fn push_to_stack(key: u32, stack: &mut Vec>>, current: RwLockReadGuard)-> () { [INFO] [stdout] | ^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/MVCC/visibility.rs:310:13 [INFO] [stdout] | [INFO] [stdout] 310 | / if current_txd < *val { [INFO] [stdout] 311 | | false [INFO] [stdout] 312 | | } else { [INFO] [stdout] 313 | | true [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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 309 ~ Some(val) [INFO] [stdout] 310 ~ if current_txd < *val => { [INFO] [stdout] 311 | false [INFO] [stdout] 312 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/MVCC/visibility.rs:310:13 [INFO] [stdout] | [INFO] [stdout] 310 | / if current_txd < *val { [INFO] [stdout] 311 | | false [INFO] [stdout] 312 | | } else { [INFO] [stdout] 313 | | true [INFO] [stdout] 314 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `current_txd >= *val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/MVCC/snapshot.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | / if let Some(xmax) = input.version[i].xmax { [INFO] [stdout] 19 | | if xmax > xmax_threshold { [INFO] [stdout] 20 | | input.version[i].xmax = None; [INFO] [stdout] 21 | | } [INFO] [stdout] 22 | | } [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] 18 ~ if let Some(xmax) = input.version[i].xmax [INFO] [stdout] 19 ~ && xmax > xmax_threshold { [INFO] [stdout] 20 | input.version[i].xmax = None; [INFO] [stdout] 21 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `ver_read_guard` [INFO] [stdout] --> src/MVCC/visibility.rs:217:18 [INFO] [stdout] | [INFO] [stdout] 217 | for i in 0..ver_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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 217 - for i in 0..ver_len { [INFO] [stdout] 217 + for (i, ) in ver_read_guard.iter().enumerate().take(ver_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `ver_read_guard` [INFO] [stdout] --> src/MVCC/visibility.rs:248:18 [INFO] [stdout] | [INFO] [stdout] 248 | for i in 0..ver_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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 248 - for i in 0..ver_len { [INFO] [stdout] 248 + for (i, ) in ver_read_guard.iter().enumerate().take(ver_len) { [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/MVCC/visibility.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | / match transaction.read().unwrap().items.get(&i){ [INFO] [stdout] 278 | | Some(item) => { [INFO] [stdout] 279 | | let x = &item.modified_keys; [INFO] [stdout] ... | [INFO] [stdout] 285 | | None => { } [INFO] [stdout] 286 | | } [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] 277 ~ if let Some(item) = transaction.read().unwrap().items.get(&i) { [INFO] [stdout] 278 + let x = &item.modified_keys; [INFO] [stdout] 279 + [INFO] [stdout] 280 + for j in x.iter() { [INFO] [stdout] 281 + if *j == new_key { return true; } [INFO] [stdout] 282 + } [INFO] [stdout] 283 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/MVCC/visibility.rs:291:95 [INFO] [stdout] | [INFO] [stdout] 291 | fn push_to_stack(key: u32, stack: &mut Vec>>, current: RwLockReadGuard)-> () { [INFO] [stdout] | ^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/MVCC/visibility.rs:310:13 [INFO] [stdout] | [INFO] [stdout] 310 | / if current_txd < *val { [INFO] [stdout] 311 | | false [INFO] [stdout] 312 | | } else { [INFO] [stdout] 313 | | true [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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 309 ~ Some(val) [INFO] [stdout] 310 ~ if current_txd < *val => { [INFO] [stdout] 311 | false [INFO] [stdout] 312 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/btree/node.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 32 | / let instance = Arc::new(RwLock::new(Node { [INFO] [stdout] 33 | | input: Vec::new(), [INFO] [stdout] 34 | | rank: 1, [INFO] [stdout] 35 | | children: Vec::new(), [INFO] [stdout] 36 | | })); [INFO] [stdout] | |____________- unnecessary `let` binding [INFO] [stdout] 37 | instance [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 32 ~ [INFO] [stdout] 33 ~ Arc::new(RwLock::new(Node { [INFO] [stdout] 34 + input: Vec::new(), [INFO] [stdout] 35 + rank: 1, [INFO] [stdout] 36 + children: Vec::new(), [INFO] [stdout] 37 + })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/MVCC/visibility.rs:310:13 [INFO] [stdout] | [INFO] [stdout] 310 | / if current_txd < *val { [INFO] [stdout] 311 | | false [INFO] [stdout] 312 | | } else { [INFO] [stdout] 313 | | true [INFO] [stdout] 314 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `current_txd >= *val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/MVCC/snapshot.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | / if let Some(xmax) = input.version[i].xmax { [INFO] [stdout] 19 | | if xmax > xmax_threshold { [INFO] [stdout] 20 | | input.version[i].xmax = None; [INFO] [stdout] 21 | | } [INFO] [stdout] 22 | | } [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] 18 ~ if let Some(xmax) = input.version[i].xmax [INFO] [stdout] 19 ~ && xmax > xmax_threshold { [INFO] [stdout] 20 | input.version[i].xmax = None; [INFO] [stdout] 21 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/btree/node.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 32 | / let instance = Arc::new(RwLock::new(Node { [INFO] [stdout] 33 | | input: Vec::new(), [INFO] [stdout] 34 | | rank: 1, [INFO] [stdout] 35 | | children: Vec::new(), [INFO] [stdout] 36 | | })); [INFO] [stdout] | |____________- unnecessary `let` binding [INFO] [stdout] 37 | instance [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 32 ~ [INFO] [stdout] 33 ~ Arc::new(RwLock::new(Node { [INFO] [stdout] 34 + input: Vec::new(), [INFO] [stdout] 35 + rank: 1, [INFO] [stdout] 36 + children: Vec::new(), [INFO] [stdout] 37 + })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/btree/sort.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | self_write.input.sort_by(|a, b| a.key.cmp(&b.key)); [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] 17 - self_write.input.sort_by(|a, b| a.key.cmp(&b.key)); [INFO] [stdout] 17 + self_write.input.sort_by_key(|a| a.key); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/btree/ops.rs:72:40 [INFO] [stdout] | [INFO] [stdout] 72 | let guard = Arc::clone(&read_guard.children.last().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `read_guard.children.last().unwrap()` [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: consider using `sort_by_key` [INFO] [stdout] --> src/btree/sort.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | self_write.input.sort_by(|a, b| a.key.cmp(&b.key)); [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] 17 - self_write.input.sort_by(|a, b| a.key.cmp(&b.key)); [INFO] [stdout] 17 + self_write.input.sort_by_key(|a| a.key); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/btree/scan.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | /// But both the `.unwrap()` are safe, I think. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 19 | /// But both the `.unwrap()` are safe, I think. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/btree/scan.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | /// `child.input.len() < NODE_SIZE/2 && child.rank > 1` to a temporary storage vector. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 64 | /// `child.input.len() < NODE_SIZE/2 && child.rank > 1` to a temporary storage vector. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/btree/scan.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | /// order to avoid issues with shifting child indices during removal. [INFO] [stdout] | ^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` 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/btree/ops.rs:72:40 [INFO] [stdout] | [INFO] [stdout] 72 | let guard = Arc::clone(&read_guard.children.last().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `read_guard.children.last().unwrap()` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/btree/repair.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | let breaking_point = (items_size + 1) / 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `items_size.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/btree/repair.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | i = i + 1; // Variable "i" was used instead of count because `i` denotes the number of keys in struct_two. [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/btree/scan.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | /// But both the `.unwrap()` are safe, I think. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 19 | /// But both the `.unwrap()` are safe, I think. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/btree/scan.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | /// `child.input.len() < NODE_SIZE/2 && child.rank > 1` to a temporary storage vector. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 64 | /// `child.input.len() < NODE_SIZE/2 && child.rank > 1` to a temporary storage vector. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/btree/scan.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | /// order to avoid issues with shifting child indices during removal. [INFO] [stdout] | ^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/btree/repair.rs:276:13 [INFO] [stdout] | [INFO] [stdout] 276 | key_nodes.sort_by(|a, b| a.0.cmp(&b.0)); [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] 276 - key_nodes.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 276 + key_nodes.sort_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/btree/repair.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | let breaking_point = (items_size + 1) / 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `items_size.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/btree/repair.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | i = i + 1; // Variable "i" was used instead of count because `i` denotes the number of keys in struct_two. [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/storage/ser.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | writeln!(file, "").expect("panic message"); [INFO] [stdout] | ^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/btree/repair.rs:276:13 [INFO] [stdout] | [INFO] [stdout] 276 | key_nodes.sort_by(|a, b| a.0.cmp(&b.0)); [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] 276 - key_nodes.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 276 + key_nodes.sort_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/storage/deser/raw.rs:56:30 [INFO] [stdout] | [INFO] [stdout] 56 | digit if digit.is_ascii_digit() && inside_brackets || inside_brackets && digit == '-' => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 56 - digit if digit.is_ascii_digit() && inside_brackets || inside_brackets && digit == '-' => { [INFO] [stdout] 56 + digit if !(!inside_brackets || !digit.is_ascii_digit() && digit != '-') => { [INFO] [stdout] | [INFO] [stdout] 56 - digit if digit.is_ascii_digit() && inside_brackets || inside_brackets && digit == '-' => { [INFO] [stdout] 56 + digit if (digit == '-' || digit.is_ascii_digit()) && inside_brackets => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/storage/ser.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | writeln!(file, "").expect("panic message"); [INFO] [stdout] | ^^^^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/storage/deser/raw.rs:56:30 [INFO] [stdout] | [INFO] [stdout] 56 | digit if digit.is_ascii_digit() && inside_brackets || inside_brackets && digit == '-' => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 56 - digit if digit.is_ascii_digit() && inside_brackets || inside_brackets && digit == '-' => { [INFO] [stdout] 56 + digit if !(!inside_brackets || !digit.is_ascii_digit() && digit != '-') => { [INFO] [stdout] | [INFO] [stdout] 56 - digit if digit.is_ascii_digit() && inside_brackets || inside_brackets && digit == '-' => { [INFO] [stdout] 56 + digit if (digit == '-' || digit.is_ascii_digit()) && inside_brackets => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/storage/wal/recovery.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn initialize_from_wal(wal_file_path... Arc>>) -> io::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 function has too many arguments (8/7) [INFO] [stdout] --> src/storage/wal/recovery.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn initialize_from_wal(wal_file_path... Arc>>) -> io::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: module has the same name as its containing module [INFO] [stdout] --> src/transactions/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod transactions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/transactions/manager.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | / if let Some(x) = tx.ip_txd.get(i) { [INFO] [stdout] 14 | | if let Some(t_items) = tx.items.get(x) { [INFO] [stdout] 15 | | if t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | | all_txd.push(*x); [INFO] [stdout] ... | [INFO] [stdout] 19 | | } [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] 13 ~ if let Some(x) = tx.ip_txd.get(i) [INFO] [stdout] 14 ~ && let Some(t_items) = tx.items.get(x) { [INFO] [stdout] 15 | if t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | all_txd.push(*x); [INFO] [stdout] 17 | } [INFO] [stdout] 18 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/transactions/manager.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | / if let Some(t_items) = tx.items.get(x) { [INFO] [stdout] 15 | | if t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | | all_txd.push(*x); [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [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] 14 ~ if let Some(t_items) = tx.items.get(x) [INFO] [stdout] 15 ~ && t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | all_txd.push(*x); [INFO] [stdout] 17 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cli/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod cli; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/cli/cli.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn cli(mut cli_input: String, txd_co...p>>, log_entry: bool ) -> io::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: module has the same name as its containing module [INFO] [stdout] --> src/transactions/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod transactions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/transactions/manager.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | / if let Some(x) = tx.ip_txd.get(i) { [INFO] [stdout] 14 | | if let Some(t_items) = tx.items.get(x) { [INFO] [stdout] 15 | | if t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | | all_txd.push(*x); [INFO] [stdout] ... | [INFO] [stdout] 19 | | } [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] 13 ~ if let Some(x) = tx.ip_txd.get(i) [INFO] [stdout] 14 ~ && let Some(t_items) = tx.items.get(x) { [INFO] [stdout] 15 | if t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | all_txd.push(*x); [INFO] [stdout] 17 | } [INFO] [stdout] 18 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/cli/cli.rs:195:31 [INFO] [stdout] | [INFO] [stdout] 195 | let txd = current_transaction.read().unwrap().ip_txd.get(&addr).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*current_transaction.read().unwrap().ip_txd.get(&addr).unwrap()` [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 `if` statement can be collapsed [INFO] [stdout] --> src/transactions/manager.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | / if let Some(t_items) = tx.items.get(x) { [INFO] [stdout] 15 | | if t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | | all_txd.push(*x); [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [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] 14 ~ if let Some(t_items) = tx.items.get(x) [INFO] [stdout] 15 ~ && t_items.status == TransactionStatus::Active { [INFO] [stdout] 16 | all_txd.push(*x); [INFO] [stdout] 17 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cli/cli.rs:220:33 [INFO] [stdout] | [INFO] [stdout] 220 | / ... if let Ok(exists) = Node::insert(Arc::clone(&new_node), key, value, x, *vid_read) { [INFO] [stdout] 221 | | ... if !exists { [INFO] [stdout] 222 | | ... if let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | | ... item.modified_keys.push(key); [INFO] [stdout] ... | [INFO] [stdout] 226 | | ... } [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] 220 ~ if let Ok(exists) = Node::insert(Arc::clone(&new_node), key, value, x, *vid_read) [INFO] [stdout] 221 ~ && !exists { [INFO] [stdout] 222 | if let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | item.modified_keys.push(key); [INFO] [stdout] 224 | } [INFO] [stdout] 225 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cli/cli.rs:221:37 [INFO] [stdout] | [INFO] [stdout] 221 | / ... if !exists { [INFO] [stdout] 222 | | ... if let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | | ... item.modified_keys.push(key); [INFO] [stdout] 224 | | ... } [INFO] [stdout] 225 | | ... } [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] 221 ~ if !exists [INFO] [stdout] 222 ~ && let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | item.modified_keys.push(key); [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cli/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod cli; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/cli/cli.rs:249:31 [INFO] [stdout] | [INFO] [stdout] 249 | let txd = current_transaction.read().unwrap().ip_txd.get(&addr).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*current_transaction.read().unwrap().ip_txd.get(&addr).unwrap()` [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 function has too many arguments (10/7) [INFO] [stdout] --> src/cli/cli.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn cli(mut cli_input: String, txd_co...p>>, log_entry: bool ) -> io::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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/cli/cli.rs:306:31 [INFO] [stdout] | [INFO] [stdout] 306 | let txd = current_transaction.read().unwrap().ip_txd.get(&addr).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*current_transaction.read().unwrap().ip_txd.get(&addr).unwrap()` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/cli/cli.rs:370:25 [INFO] [stdout] | [INFO] [stdout] 370 | / match tx.ip_txd.get(&addr) { [INFO] [stdout] 371 | | Some(&x) => { [INFO] [stdout] 372 | | let messages ; [INFO] [stdout] 373 | | match select_key(Arc::clone(&new_node), key, x, Arc::clone(¤t_transaction)) { [INFO] [stdout] ... | [INFO] [stdout] 385 | | None => {} [INFO] [stdout] 386 | | } [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] 370 ~ if let Some(&x) = tx.ip_txd.get(&addr) { [INFO] [stdout] 371 + let messages ; [INFO] [stdout] 372 + match select_key(Arc::clone(&new_node), key, x, Arc::clone(¤t_transaction)) { [INFO] [stdout] 373 + Some(value) => { [INFO] [stdout] 374 + messages = format!("Value: {:?}", value) [INFO] [stdout] 375 + }, [INFO] [stdout] 376 + None => { [INFO] [stdout] 377 + messages = String::from("Key not found") [INFO] [stdout] 378 + }, [INFO] [stdout] 379 + } [INFO] [stdout] 380 + [INFO] [stdout] 381 + log_message(messages.as_str()); [INFO] [stdout] 382 + [INFO] [stdout] 383 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/cli/cli.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... let messages ; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `messages` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 372 ~ [INFO] [stdout] 373 ~ let messages = match select_key(Arc::clone(&new_node), key, x, Arc::clone(¤t_transaction)) { [INFO] [stdout] 374 | Some(value) => { [INFO] [stdout] 375 ~ format!("Value: {:?}", value) [INFO] [stdout] 376 | }, [INFO] [stdout] 377 | None => { [INFO] [stdout] 378 ~ String::from("Key not found") [INFO] [stdout] 379 | }, [INFO] [stdout] 380 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/cli/cli.rs:195:31 [INFO] [stdout] | [INFO] [stdout] 195 | let txd = current_transaction.read().unwrap().ip_txd.get(&addr).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*current_transaction.read().unwrap().ip_txd.get(&addr).unwrap()` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/cli/cli.rs:436:25 [INFO] [stdout] | [INFO] [stdout] 436 | / match tx.ip_txd.get(&addr) { [INFO] [stdout] 437 | | Some(&x) => { [INFO] [stdout] 438 | | let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 439 | | println!("{:?}", tree_node.read().unwrap().print_tree()); [INFO] [stdout] 440 | | } [INFO] [stdout] 441 | | None => {} [INFO] [stdout] 442 | | } [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] 436 ~ if let Some(&x) = tx.ip_txd.get(&addr) { [INFO] [stdout] 437 + let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 438 + println!("{:?}", tree_node.read().unwrap().print_tree()); [INFO] [stdout] 439 + } [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/cli/cli.rs:456:25 [INFO] [stdout] | [INFO] [stdout] 456 | / match tx.ip_txd.get(&addr) { [INFO] [stdout] 457 | | Some(&x) => { [INFO] [stdout] 458 | | let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 459 | | println!("{:?}", tree_node.read().unwrap().print_stats()); [INFO] [stdout] 460 | | } [INFO] [stdout] 461 | | None => {} [INFO] [stdout] 462 | | } [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] 456 ~ if let Some(&x) = tx.ip_txd.get(&addr) { [INFO] [stdout] 457 + let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 458 + println!("{:?}", tree_node.read().unwrap().print_stats()); [INFO] [stdout] 459 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cli/cli.rs:220:33 [INFO] [stdout] | [INFO] [stdout] 220 | / ... if let Ok(exists) = Node::insert(Arc::clone(&new_node), key, value, x, *vid_read) { [INFO] [stdout] 221 | | ... if !exists { [INFO] [stdout] 222 | | ... if let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | | ... item.modified_keys.push(key); [INFO] [stdout] ... | [INFO] [stdout] 226 | | ... } [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] 220 ~ if let Ok(exists) = Node::insert(Arc::clone(&new_node), key, value, x, *vid_read) [INFO] [stdout] 221 ~ && !exists { [INFO] [stdout] 222 | if let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | item.modified_keys.push(key); [INFO] [stdout] 224 | } [INFO] [stdout] 225 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cli/cli.rs:221:37 [INFO] [stdout] | [INFO] [stdout] 221 | / ... if !exists { [INFO] [stdout] 222 | | ... if let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | | ... item.modified_keys.push(key); [INFO] [stdout] 224 | | ... } [INFO] [stdout] 225 | | ... } [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] 221 ~ if !exists [INFO] [stdout] 222 ~ && let Some(item) = tx.items.get_mut(&x) { [INFO] [stdout] 223 | item.modified_keys.push(key); [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/cli/cli.rs:249:31 [INFO] [stdout] | [INFO] [stdout] 249 | let txd = current_transaction.read().unwrap().ip_txd.get(&addr).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*current_transaction.read().unwrap().ip_txd.get(&addr).unwrap()` [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: length comparison to zero [INFO] [stdout] --> src/engine/checkpoint.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | if all_active_txd.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `all_active_txd.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 function has too many arguments (10/7) [INFO] [stdout] --> src/engine/stream_processor.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn process_tcp_stream(mut stream: Tc...ap>>, tx: Sender) -> io::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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/cli/cli.rs:306:31 [INFO] [stdout] | [INFO] [stdout] 306 | let txd = current_transaction.read().unwrap().ip_txd.get(&addr).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*current_transaction.read().unwrap().ip_txd.get(&addr).unwrap()` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/cli/cli.rs:370:25 [INFO] [stdout] | [INFO] [stdout] 370 | / match tx.ip_txd.get(&addr) { [INFO] [stdout] 371 | | Some(&x) => { [INFO] [stdout] 372 | | let messages ; [INFO] [stdout] 373 | | match select_key(Arc::clone(&new_node), key, x, Arc::clone(¤t_transaction)) { [INFO] [stdout] ... | [INFO] [stdout] 385 | | None => {} [INFO] [stdout] 386 | | } [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] 370 ~ if let Some(&x) = tx.ip_txd.get(&addr) { [INFO] [stdout] 371 + let messages ; [INFO] [stdout] 372 + match select_key(Arc::clone(&new_node), key, x, Arc::clone(¤t_transaction)) { [INFO] [stdout] 373 + Some(value) => { [INFO] [stdout] 374 + messages = format!("Value: {:?}", value) [INFO] [stdout] 375 + }, [INFO] [stdout] 376 + None => { [INFO] [stdout] 377 + messages = String::from("Key not found") [INFO] [stdout] 378 + }, [INFO] [stdout] 379 + } [INFO] [stdout] 380 + [INFO] [stdout] 381 + log_message(messages.as_str()); [INFO] [stdout] 382 + [INFO] [stdout] 383 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/cli/cli.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... let messages ; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `messages` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 372 ~ [INFO] [stdout] 373 ~ let messages = match select_key(Arc::clone(&new_node), key, x, Arc::clone(¤t_transaction)) { [INFO] [stdout] 374 | Some(value) => { [INFO] [stdout] 375 ~ format!("Value: {:?}", value) [INFO] [stdout] 376 | }, [INFO] [stdout] 377 | None => { [INFO] [stdout] 378 ~ String::from("Key not found") [INFO] [stdout] 379 | }, [INFO] [stdout] 380 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/engine/stream_processor.rs:87:1 [INFO] [stdout] | [INFO] [stdout] 87 | fn handle_cli_and_checkpoint(command: St...>> ,tx: &Sender ) -> io::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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/engine/stream_processor.rs:88:158 [INFO] [stdout] | [INFO] [stdout] 88 | ...t_transaction) , Arc::clone(&new_node), Some(&stream), Arc::clone(&all_addr), Arc::clone(&ts_ord), true) { [INFO] [stdout] | ^^^^^^^ help: change this to: `stream` [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 be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/cli/cli.rs:436:25 [INFO] [stdout] | [INFO] [stdout] 436 | / match tx.ip_txd.get(&addr) { [INFO] [stdout] 437 | | Some(&x) => { [INFO] [stdout] 438 | | let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 439 | | println!("{:?}", tree_node.read().unwrap().print_tree()); [INFO] [stdout] 440 | | } [INFO] [stdout] 441 | | None => {} [INFO] [stdout] 442 | | } [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] 436 ~ if let Some(&x) = tx.ip_txd.get(&addr) { [INFO] [stdout] 437 + let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 438 + println!("{:?}", tree_node.read().unwrap().print_tree()); [INFO] [stdout] 439 + } [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/cli/cli.rs:456:25 [INFO] [stdout] | [INFO] [stdout] 456 | / match tx.ip_txd.get(&addr) { [INFO] [stdout] 457 | | Some(&x) => { [INFO] [stdout] 458 | | let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 459 | | println!("{:?}", tree_node.read().unwrap().print_stats()); [INFO] [stdout] 460 | | } [INFO] [stdout] 461 | | None => {} [INFO] [stdout] 462 | | } [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] 456 ~ if let Some(&x) = tx.ip_txd.get(&addr) { [INFO] [stdout] 457 + let tree_node = snapshot(duplicate_node, Some(x)); [INFO] [stdout] 458 + println!("{:?}", tree_node.read().unwrap().print_stats()); [INFO] [stdout] 459 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/btree/repair.rs:244:17 [INFO] [stdout] | [INFO] [stdout] 244 | vec![some_val_input[0].key, some_val_input.last().unwrap().key]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[some_val_input[0].key, some_val_input.last().unwrap().key]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/btree/repair.rs:248:47 [INFO] [stdout] | [INFO] [stdout] 248 | let keys_secondary_required = vec![ [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 249 | | some_other_val_input[0].key, [INFO] [stdout] 250 | | some_other_val_input.last().unwrap().key, [INFO] [stdout] 251 | | ]; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 248 ~ let keys_secondary_required = [some_other_val_input[0].key, [INFO] [stdout] 249 ~ some_other_val_input.last().unwrap().key]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/btree/repair.rs:308:37 [INFO] [stdout] | [INFO] [stdout] 308 | let require_child = vec![guard.input[0].key, guard.input[k - 1].key]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[guard.input[0].key, guard.input[k - 1].key]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `MVCC` should have a snake case name [INFO] [stdout] --> src/lib.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub mod MVCC; [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `mvcc` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/storage/deser/raw.rs:10:47 [INFO] [stdout] | [INFO] [stdout] 10 | let file = File::open(serialized_file_path.clone())?; [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/engine/checkpoint.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | if all_active_txd.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `all_active_txd.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 function has too many arguments (10/7) [INFO] [stdout] --> src/engine/stream_processor.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn process_tcp_stream(mut stream: Tc...ap>>, tx: Sender) -> io::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: unused `std::result::Result` that must be used [INFO] [stdout] --> src/storage/wal/writer.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | bincode::serialize_into(&mut writer, &record_struct_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 36 | let _ = bincode::serialize_into(&mut writer, &record_struct_instance); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/engine/stream_processor.rs:87:1 [INFO] [stdout] | [INFO] [stdout] 87 | fn handle_cli_and_checkpoint(command: St...>> ,tx: &Sender ) -> io::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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/engine/stream_processor.rs:88:158 [INFO] [stdout] | [INFO] [stdout] 88 | ...t_transaction) , Arc::clone(&new_node), Some(&stream), Arc::clone(&all_addr), Arc::clone(&ts_ord), true) { [INFO] [stdout] | ^^^^^^^ help: change this to: `stream` [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: useless use of `vec!` [INFO] [stdout] --> src/btree/repair.rs:244:17 [INFO] [stdout] | [INFO] [stdout] 244 | vec![some_val_input[0].key, some_val_input.last().unwrap().key]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[some_val_input[0].key, some_val_input.last().unwrap().key]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/btree/repair.rs:248:47 [INFO] [stdout] | [INFO] [stdout] 248 | let keys_secondary_required = vec![ [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 249 | | some_other_val_input[0].key, [INFO] [stdout] 250 | | some_other_val_input.last().unwrap().key, [INFO] [stdout] 251 | | ]; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 248 ~ let keys_secondary_required = [some_other_val_input[0].key, [INFO] [stdout] 249 ~ some_other_val_input.last().unwrap().key]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/btree/repair.rs:308:37 [INFO] [stdout] | [INFO] [stdout] 308 | let require_child = vec![guard.input[0].key, guard.input[k - 1].key]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[guard.input[0].key, guard.input[k - 1].key]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate `ASMT` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = help: convert the identifier to snake case: `asmt` [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `MVCC` should have a snake case name [INFO] [stdout] --> src/lib.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub mod MVCC; [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `mvcc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/storage/deser/raw.rs:10:47 [INFO] [stdout] | [INFO] [stdout] 10 | let file = File::open(serialized_file_path.clone())?; [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/storage/wal/writer.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | bincode::serialize_into(&mut writer, &record_struct_instance); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 36 | let _ = bincode::serialize_into(&mut writer, &record_struct_instance); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/main.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | while let Ok(_) = rx.recv() { [INFO] [stdout] | ----------^^^^^------------ help: try: `while rx.recv().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/main.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | while let Ok(_) = rx.recv() { [INFO] [stdout] | ----------^^^^^------------ help: try: `while rx.recv().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.98s [INFO] running `Command { std: "docker" "inspect" "766204d0329c001debd8044e24a38bdf8b3882142c86814ff076dd3176b7ecda", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "766204d0329c001debd8044e24a38bdf8b3882142c86814ff076dd3176b7ecda", kill_on_drop: false }` [INFO] [stdout] 766204d0329c001debd8044e24a38bdf8b3882142c86814ff076dd3176b7ecda