[INFO] cloning repository https://github.com/kig/fast_read_optimizer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kig/fast_read_optimizer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkig%2Ffast_read_optimizer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkig%2Ffast_read_optimizer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c142a05135e60b1cfeb22cc64679c6722135270c [INFO] linting kig/fast_read_optimizer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkig%2Ffast_read_optimizer" "/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/kig/fast_read_optimizer [INFO] finished tweaking git repo https://github.com/kig/fast_read_optimizer [INFO] tweaked toml for git repo https://github.com/kig/fast_read_optimizer written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/kig/fast_read_optimizer 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/kig/fast_read_optimizer already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded iou v0.3.3 [INFO] [stderr] Downloaded io-uring v0.7.11 [INFO] [stderr] Downloaded uring-sys v0.7.4 [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] b1ffefcec4ec11daccb2568270e1d45a95f31d19298c4a4be283e373eb1ea2a6 [INFO] running `Command { std: "docker" "start" "-a" "b1ffefcec4ec11daccb2568270e1d45a95f31d19298c4a4be283e373eb1ea2a6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b1ffefcec4ec11daccb2568270e1d45a95f31d19298c4a4be283e373eb1ea2a6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b1ffefcec4ec11daccb2568270e1d45a95f31d19298c4a4be283e373eb1ea2a6", kill_on_drop: false }` [INFO] [stdout] b1ffefcec4ec11daccb2568270e1d45a95f31d19298c4a4be283e373eb1ea2a6 [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] 0459f9731fc65b24c8e226f140d005a0e3d53e9a818877f370433c61c42384c7 [INFO] running `Command { std: "docker" "start" "-a" "0459f9731fc65b24c8e226f140d005a0e3d53e9a818877f370433c61c42384c7", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling getrandom v0.4.2 [INFO] [stderr] Compiling io-uring v0.7.11 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Checking xxhash-rust v0.8.15 [INFO] [stderr] Checking nix v0.18.0 [INFO] [stderr] Checking rand v0.10.0 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling cc v1.2.56 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling uring-sys v0.7.4 [INFO] [stderr] Checking iou v0.3.3 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking fro v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/writer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::Rng; [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: `rand::Rng` [INFO] [stdout] --> src/writer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/common.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | let num_pages = (len + 4095) / 4096; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4096)` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/mincore.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | let len_aligned = (len + offset_diff as usize + page_size - 1) / page_size * page_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(len + offset_diff as usize).div_ceil(page_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/block_hash.rs:156:40 [INFO] [stdout] | [INFO] [stdout] 156 | let mut bytes = Vec::with_capacity(values.len() * std::mem::size_of::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(values)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | if block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:19 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:43 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:536:1 [INFO] [stdout] | [INFO] [stdout] 536 | / fn submit_read( [INFO] [stdout] 537 | | io_uring: &mut IoUring, [INFO] [stdout] 538 | | file: &File, [INFO] [stdout] 539 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 544 | | file_size: u64, [INFO] [stdout] 545 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/block_hash.rs:572:1 [INFO] [stdout] | [INFO] [stdout] 572 | / fn thread_hash_reader( [INFO] [stdout] 573 | | thread_id: u64, [INFO] [stdout] 574 | | num_threads: u64, [INFO] [stdout] 575 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 582 | | use_direct: bool, [INFO] [stdout] 583 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:620:31 [INFO] [stdout] | [INFO] [stdout] 620 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:624:25 [INFO] [stdout] | [INFO] [stdout] 624 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:661:1 [INFO] [stdout] | [INFO] [stdout] 661 | / fn hash_file_blocks_inner( [INFO] [stdout] 662 | | filename: &str, [INFO] [stdout] 663 | | num_threads_p: u64, [INFO] [stdout] 664 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 669 | | io_mode: IOMode, [INFO] [stdout] 670 | | ) -> std::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 function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:737:1 [INFO] [stdout] | [INFO] [stdout] 737 | / pub fn hash_file_blocks( [INFO] [stdout] 738 | | filename: &str, [INFO] [stdout] 739 | | num_threads_p: u64, [INFO] [stdout] 740 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 745 | | io_mode: IOMode, [INFO] [stdout] 746 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:759:1 [INFO] [stdout] | [INFO] [stdout] 759 | / pub fn hash_file_to_replicas( [INFO] [stdout] 760 | | filename: &str, [INFO] [stdout] 761 | | hash_base: Option<&str>, [INFO] [stdout] 762 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 768 | | io_mode: IOMode, [INFO] [stdout] 769 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:787:1 [INFO] [stdout] | [INFO] [stdout] 787 | / pub fn verify_file_with_replicas( [INFO] [stdout] 788 | | filename: &str, [INFO] [stdout] 789 | | hash_base: Option<&str>, [INFO] [stdout] 790 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 796 | | io_mode: IOMode, [INFO] [stdout] 797 | | ) -> std::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 function has too many arguments (11/7) [INFO] [stdout] --> src/block_hash.rs:1013:1 [INFO] [stdout] | [INFO] [stdout] 1013 | / pub fn recover_file_with_copies( [INFO] [stdout] 1014 | | target: &str, [INFO] [stdout] 1015 | | copies: &[String], [INFO] [stdout] 1016 | | hash_base: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 1024 | | recover_mode: RecoverMode, [INFO] [stdout] 1025 | | ) -> std::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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/common.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | let num_pages = (len + 4095) / 4096; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4096)` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/mincore.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | let len_aligned = (len + offset_diff as usize + page_size - 1) / page_size * page_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(len + offset_diff as usize).div_ceil(page_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/block_hash.rs:156:40 [INFO] [stdout] | [INFO] [stdout] 156 | let mut bytes = Vec::with_capacity(values.len() * std::mem::size_of::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(values)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | if block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:19 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:43 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:536:1 [INFO] [stdout] | [INFO] [stdout] 536 | / fn submit_read( [INFO] [stdout] 537 | | io_uring: &mut IoUring, [INFO] [stdout] 538 | | file: &File, [INFO] [stdout] 539 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 544 | | file_size: u64, [INFO] [stdout] 545 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/block_hash.rs:572:1 [INFO] [stdout] | [INFO] [stdout] 572 | / fn thread_hash_reader( [INFO] [stdout] 573 | | thread_id: u64, [INFO] [stdout] 574 | | num_threads: u64, [INFO] [stdout] 575 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 582 | | use_direct: bool, [INFO] [stdout] 583 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:620:31 [INFO] [stdout] | [INFO] [stdout] 620 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:624:25 [INFO] [stdout] | [INFO] [stdout] 624 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:661:1 [INFO] [stdout] | [INFO] [stdout] 661 | / fn hash_file_blocks_inner( [INFO] [stdout] 662 | | filename: &str, [INFO] [stdout] 663 | | num_threads_p: u64, [INFO] [stdout] 664 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 669 | | io_mode: IOMode, [INFO] [stdout] 670 | | ) -> std::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 function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:737:1 [INFO] [stdout] | [INFO] [stdout] 737 | / pub fn hash_file_blocks( [INFO] [stdout] 738 | | filename: &str, [INFO] [stdout] 739 | | num_threads_p: u64, [INFO] [stdout] 740 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 745 | | io_mode: IOMode, [INFO] [stdout] 746 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:759:1 [INFO] [stdout] | [INFO] [stdout] 759 | / pub fn hash_file_to_replicas( [INFO] [stdout] 760 | | filename: &str, [INFO] [stdout] 761 | | hash_base: Option<&str>, [INFO] [stdout] 762 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 768 | | io_mode: IOMode, [INFO] [stdout] 769 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:787:1 [INFO] [stdout] | [INFO] [stdout] 787 | / pub fn verify_file_with_replicas( [INFO] [stdout] 788 | | filename: &str, [INFO] [stdout] 789 | | hash_base: Option<&str>, [INFO] [stdout] 790 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 796 | | io_mode: IOMode, [INFO] [stdout] 797 | | ) -> std::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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | if params.use_direct && params.block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!params.block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:19 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:43 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 144 | / fn submit_read( [INFO] [stdout] 145 | | io_uring: &mut IoUring, [INFO] [stdout] 146 | | file: &File, [INFO] [stdout] 147 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 152 | | file_size: u64, [INFO] [stdout] 153 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:180:1 [INFO] [stdout] | [INFO] [stdout] 180 | / fn thread_reader( [INFO] [stdout] 181 | | thread_id: u64, [INFO] [stdout] 182 | | pattern: String, [INFO] [stdout] 183 | | num_threads: u64, [INFO] [stdout] ... | [INFO] [stdout] 190 | | use_direct: bool, [INFO] [stdout] 191 | | ) -> Vec { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:230:31 [INFO] [stdout] | [INFO] [stdout] 230 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:276:1 [INFO] [stdout] | [INFO] [stdout] 276 | / fn thread_loader( [INFO] [stdout] 277 | | thread_id: u64, [INFO] [stdout] 278 | | num_threads: u64, [INFO] [stdout] 279 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 286 | | use_direct: bool, [INFO] [stdout] 287 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/block_hash.rs:1013:1 [INFO] [stdout] | [INFO] [stdout] 1013 | / pub fn recover_file_with_copies( [INFO] [stdout] 1014 | | target: &str, [INFO] [stdout] 1015 | | copies: &[String], [INFO] [stdout] 1016 | | hash_base: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 1024 | | recover_mode: RecoverMode, [INFO] [stdout] 1025 | | ) -> std::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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:323:31 [INFO] [stdout] | [INFO] [stdout] 323 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:327:25 [INFO] [stdout] | [INFO] [stdout] 327 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/reader.rs:371:1 [INFO] [stdout] | [INFO] [stdout] 371 | / fn thread_map_blocks( [INFO] [stdout] 372 | | thread_id: u64, [INFO] [stdout] 373 | | num_threads: u64, [INFO] [stdout] 374 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 385 | | T: Send + 'static, [INFO] [stdout] 386 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:423:31 [INFO] [stdout] | [INFO] [stdout] 423 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:427:25 [INFO] [stdout] | [INFO] [stdout] 427 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:470:1 [INFO] [stdout] | [INFO] [stdout] 470 | / fn thread_visit_blocks( [INFO] [stdout] 471 | | thread_id: u64, [INFO] [stdout] 472 | | num_threads: u64, [INFO] [stdout] 473 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 482 | | where [INFO] [stdout] 483 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:520:31 [INFO] [stdout] | [INFO] [stdout] 520 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:524:25 [INFO] [stdout] | [INFO] [stdout] 524 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | / pub fn load_file_to_memory( [INFO] [stdout] 567 | | filename: &str, [INFO] [stdout] 568 | | num_threads_p: u64, [INFO] [stdout] 569 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 574 | | io_mode: IOMode, [INFO] [stdout] 575 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:669:1 [INFO] [stdout] | [INFO] [stdout] 669 | / pub fn map_file_blocks( [INFO] [stdout] 670 | | filename: &str, [INFO] [stdout] 671 | | num_threads_p: u64, [INFO] [stdout] 672 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 681 | | T: Send + 'static, [INFO] [stdout] 682 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:789:1 [INFO] [stdout] | [INFO] [stdout] 789 | / pub fn visit_file_blocks( [INFO] [stdout] 790 | | filename: &str, [INFO] [stdout] 791 | | num_threads_p: u64, [INFO] [stdout] 792 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 800 | | where [INFO] [stdout] 801 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [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 boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:896:21 [INFO] [stdout] | [INFO] [stdout] 896 | Ok(true) => true && io_mode != IOMode::Direct, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode != IOMode::Direct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:897:14 [INFO] [stdout] | [INFO] [stdout] 897 | _ => false || io_mode == IOMode::PageCache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode == IOMode::PageCache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:881:1 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn read_file( [INFO] [stdout] 882 | | pattern: &str, [INFO] [stdout] 883 | | filename: &str, [INFO] [stdout] 884 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 890 | | io_mode: IOMode, [INFO] [stdout] 891 | | ) -> u64 { [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: struct `ParallelFile` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/stream.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | pub fn len(&self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:46 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `start.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:67 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:45 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:67 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:356:1 [INFO] [stdout] | [INFO] [stdout] 356 | / fn thread_writer( [INFO] [stdout] 357 | | thread_id: u64, [INFO] [stdout] 358 | | source_file: Option<(&File, &File)>, [INFO] [stdout] 359 | | dest_file: (&File, &File), [INFO] [stdout] ... | [INFO] [stdout] 367 | | use_direct: bool, [INFO] [stdout] 368 | | ) { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:389:26 [INFO] [stdout] | [INFO] [stdout] 389 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:30 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `buffer_offsets[idx].is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:67 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:459:34 [INFO] [stdout] | [INFO] [stdout] 459 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:512:1 [INFO] [stdout] | [INFO] [stdout] 512 | / pub fn write_file( [INFO] [stdout] 513 | | source: Option<&str>, [INFO] [stdout] 514 | | filename: &str, [INFO] [stdout] 515 | | create_size: Option, [INFO] [stdout] ... | [INFO] [stdout] 523 | | io_mode_write: IOMode, [INFO] [stdout] 524 | | ) -> u64 { [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: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:567:14 [INFO] [stdout] | [INFO] [stdout] 567 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:624:10 [INFO] [stdout] | [INFO] [stdout] 624 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:694:10 [INFO] [stdout] | [INFO] [stdout] 694 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | if params.use_direct && params.block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!params.block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:19 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:43 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 144 | / fn submit_read( [INFO] [stdout] 145 | | io_uring: &mut IoUring, [INFO] [stdout] 146 | | file: &File, [INFO] [stdout] 147 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 152 | | file_size: u64, [INFO] [stdout] 153 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:180:1 [INFO] [stdout] | [INFO] [stdout] 180 | / fn thread_reader( [INFO] [stdout] 181 | | thread_id: u64, [INFO] [stdout] 182 | | pattern: String, [INFO] [stdout] 183 | | num_threads: u64, [INFO] [stdout] ... | [INFO] [stdout] 190 | | use_direct: bool, [INFO] [stdout] 191 | | ) -> Vec { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:230:31 [INFO] [stdout] | [INFO] [stdout] 230 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:276:1 [INFO] [stdout] | [INFO] [stdout] 276 | / fn thread_loader( [INFO] [stdout] 277 | | thread_id: u64, [INFO] [stdout] 278 | | num_threads: u64, [INFO] [stdout] 279 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 286 | | use_direct: bool, [INFO] [stdout] 287 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:323:31 [INFO] [stdout] | [INFO] [stdout] 323 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:327:25 [INFO] [stdout] | [INFO] [stdout] 327 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/reader.rs:371:1 [INFO] [stdout] | [INFO] [stdout] 371 | / fn thread_map_blocks( [INFO] [stdout] 372 | | thread_id: u64, [INFO] [stdout] 373 | | num_threads: u64, [INFO] [stdout] 374 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 385 | | T: Send + 'static, [INFO] [stdout] 386 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:423:31 [INFO] [stdout] | [INFO] [stdout] 423 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:427:25 [INFO] [stdout] | [INFO] [stdout] 427 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:470:1 [INFO] [stdout] | [INFO] [stdout] 470 | / fn thread_visit_blocks( [INFO] [stdout] 471 | | thread_id: u64, [INFO] [stdout] 472 | | num_threads: u64, [INFO] [stdout] 473 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 482 | | where [INFO] [stdout] 483 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:520:31 [INFO] [stdout] | [INFO] [stdout] 520 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:524:25 [INFO] [stdout] | [INFO] [stdout] 524 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | / pub fn load_file_to_memory( [INFO] [stdout] 567 | | filename: &str, [INFO] [stdout] 568 | | num_threads_p: u64, [INFO] [stdout] 569 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 574 | | io_mode: IOMode, [INFO] [stdout] 575 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:669:1 [INFO] [stdout] | [INFO] [stdout] 669 | / pub fn map_file_blocks( [INFO] [stdout] 670 | | filename: &str, [INFO] [stdout] 671 | | num_threads_p: u64, [INFO] [stdout] 672 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 681 | | T: Send + 'static, [INFO] [stdout] 682 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:789:1 [INFO] [stdout] | [INFO] [stdout] 789 | / pub fn visit_file_blocks( [INFO] [stdout] 790 | | filename: &str, [INFO] [stdout] 791 | | num_threads_p: u64, [INFO] [stdout] 792 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 800 | | where [INFO] [stdout] 801 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [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 boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:896:21 [INFO] [stdout] | [INFO] [stdout] 896 | Ok(true) => true && io_mode != IOMode::Direct, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode != IOMode::Direct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:897:14 [INFO] [stdout] | [INFO] [stdout] 897 | _ => false || io_mode == IOMode::PageCache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode == IOMode::PageCache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:881:1 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn read_file( [INFO] [stdout] 882 | | pattern: &str, [INFO] [stdout] 883 | | filename: &str, [INFO] [stdout] 884 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 890 | | io_mode: IOMode, [INFO] [stdout] 891 | | ) -> u64 { [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: struct `ParallelFile` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/stream.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | pub fn len(&self) -> std::io::Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:46 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `start.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:67 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:45 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:67 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:356:1 [INFO] [stdout] | [INFO] [stdout] 356 | / fn thread_writer( [INFO] [stdout] 357 | | thread_id: u64, [INFO] [stdout] 358 | | source_file: Option<(&File, &File)>, [INFO] [stdout] 359 | | dest_file: (&File, &File), [INFO] [stdout] ... | [INFO] [stdout] 367 | | use_direct: bool, [INFO] [stdout] 368 | | ) { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:389:26 [INFO] [stdout] | [INFO] [stdout] 389 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:30 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `buffer_offsets[idx].is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:67 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:459:34 [INFO] [stdout] | [INFO] [stdout] 459 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:512:1 [INFO] [stdout] | [INFO] [stdout] 512 | / pub fn write_file( [INFO] [stdout] 513 | | source: Option<&str>, [INFO] [stdout] 514 | | filename: &str, [INFO] [stdout] 515 | | create_size: Option, [INFO] [stdout] ... | [INFO] [stdout] 523 | | io_mode_write: IOMode, [INFO] [stdout] 524 | | ) -> u64 { [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: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:567:14 [INFO] [stdout] | [INFO] [stdout] 567 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:624:10 [INFO] [stdout] | [INFO] [stdout] 624 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:694:10 [INFO] [stdout] | [INFO] [stdout] 694 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/differ.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::Rng; [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: `rand::Rng` [INFO] [stdout] --> src/optimizer.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/writer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> examples/parallel_zstd.rs:140:31 [INFO] [stdout] | [INFO] [stdout] 140 | file.read_at(&mut footer, (file_size - FOOTER_SIZE) as u64)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((file_size - FOOTER_SIZE))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/bin/fro-benchmark.rs:85:17 [INFO] [stdout] | [INFO] [stdout] 85 | let split = s_lc [INFO] [stdout] | _________________^ [INFO] [stdout] 86 | | .find(|c: char| !c.is_ascii_digit()) [INFO] [stdout] 87 | | .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 87 - .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] 87 + .unwrap_or(s_lc.len()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/bin/fro-benchmark.rs:85:17 [INFO] [stdout] | [INFO] [stdout] 85 | let split = s_lc [INFO] [stdout] | _________________^ [INFO] [stdout] 86 | | .find(|c: char| !c.is_ascii_digit()) [INFO] [stdout] 87 | | .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 87 - .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] 87 + .unwrap_or(s_lc.len()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `t.args.get(0)` [INFO] [stdout] --> src/bin/fro-benchmark.rs:719:18 [INFO] [stdout] | [INFO] [stdout] 719 | let op = t.args.get(0).map(|s| s.as_str()).unwrap_or(""); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `t.args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `t.args.get(0)` [INFO] [stdout] --> src/bin/fro-benchmark.rs:719:18 [INFO] [stdout] | [INFO] [stdout] 719 | let op = t.args.get(0).map(|s| s.as_str()).unwrap_or(""); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `t.args.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/bin/fro-benchmark.rs:825:14 [INFO] [stdout] | [INFO] [stdout] 825 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/bin/fro-benchmark.rs:839:14 [INFO] [stdout] | [INFO] [stdout] 839 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/bin/fro-benchmark.rs:854:14 [INFO] [stdout] | [INFO] [stdout] 854 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/bin/fro-benchmark.rs:825:14 [INFO] [stdout] | [INFO] [stdout] 825 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/bin/fro-benchmark.rs:839:14 [INFO] [stdout] | [INFO] [stdout] 839 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/bin/fro-benchmark.rs:854:14 [INFO] [stdout] | [INFO] [stdout] 854 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/fro-optimize.rs:372:23 [INFO] [stdout] | [INFO] [stdout] 372 | let hex = |c: u8| matches!(c, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F'); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 372 - let hex = |c: u8| matches!(c, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F'); [INFO] [stdout] 372 + let hex = |c: u8| c.is_ascii_hexdigit(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/differ.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::Rng; [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: `rand::Rng` [INFO] [stdout] --> src/optimizer.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/writer.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/bin/fro-optimize.rs:1126:17 [INFO] [stdout] | [INFO] [stdout] 1126 | let split = s_lc [INFO] [stdout] | _________________^ [INFO] [stdout] 1127 | | .find(|c: char| !c.is_ascii_digit()) [INFO] [stdout] 1128 | | .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1128 - .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] 1128 + .unwrap_or(s_lc.len()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/bin/fro-optimize.rs:1145:8 [INFO] [stdout] | [INFO] [stdout] 1145 | if align == 0 { [INFO] [stdout] | ^^^^^^^^^^ check performed here [INFO] [stdout] ... [INFO] [stdout] 1148 | bytes / align * align [INFO] [stdout] | ------------- division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/fro-optimize.rs:1266:25 [INFO] [stdout] | [INFO] [stdout] 1266 | .filter(|e| is_disk_backed_mount(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_disk_backed_mount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/fro-optimize.rs:1629:49 [INFO] [stdout] | [INFO] [stdout] 1629 | for e in entries.into_iter().filter(|e| is_disk_backed_mount(e)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_disk_backed_mount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/bin/fro-optimize.rs:971:1 [INFO] [stdout] | [INFO] [stdout] 971 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1099 | fn fs_stats_for_path(path: &Path) -> Option<(u64, u64)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1119 | fn parse_size(s: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1144 | fn align_down(bytes: u64, align: u64) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1152 | fn fmt_gib(bytes: u64) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1156 | fn main() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/fro-optimize.rs:372:23 [INFO] [stdout] | [INFO] [stdout] 372 | let hex = |c: u8| matches!(c, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F'); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 372 - let hex = |c: u8| matches!(c, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F'); [INFO] [stdout] 372 + let hex = |c: u8| c.is_ascii_hexdigit(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ReaderBlock` is never constructed [INFO] [stdout] --> src/reader.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct ReaderBlock<'a> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MappedBlocks` is never constructed [INFO] [stdout] --> src/reader.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct MappedBlocks { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `thread_map_blocks` is never used [INFO] [stdout] --> src/reader.rs:371:4 [INFO] [stdout] | [INFO] [stdout] 371 | fn thread_map_blocks( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `thread_visit_blocks` is never used [INFO] [stdout] --> src/reader.rs:470:4 [INFO] [stdout] | [INFO] [stdout] 470 | fn thread_visit_blocks( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_file_blocks` is never used [INFO] [stdout] --> src/reader.rs:669:8 [INFO] [stdout] | [INFO] [stdout] 669 | pub fn map_file_blocks( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_file_blocks_for_mode` is never used [INFO] [stdout] --> src/reader.rs:763:8 [INFO] [stdout] | [INFO] [stdout] 763 | pub fn map_file_blocks_for_mode( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `visit_file_blocks` is never used [INFO] [stdout] --> src/reader.rs:789:8 [INFO] [stdout] | [INFO] [stdout] 789 | pub fn visit_file_blocks( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `visit_file_blocks_for_mode` is never used [INFO] [stdout] --> src/reader.rs:856:8 [INFO] [stdout] | [INFO] [stdout] 856 | pub fn visit_file_blocks_for_mode( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `buffer` and `len` are never read [INFO] [stdout] --> src/writer.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 22 | struct PendingAppend { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 23 | buffer: AlignedBuffer, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 24 | len: usize, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PendingOffsetWrite` is never constructed [INFO] [stdout] --> src/writer.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct PendingOffsetWrite { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OffsetWriter` is never constructed [INFO] [stdout] --> src/writer.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub struct OffsetWriter { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/writer.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl SequentialWriter { [INFO] [stdout] | --------------------- associated items in this implementation [INFO] [stdout] 55 | pub fn create(path: &str, qd: usize, block_size: u64, io_mode: IOMode) -> std::io::Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn open_append( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | fn open( [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn append(&mut self, data: &[u8]) -> std::io::Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 109 | pub fn bytes_written(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn flush(&mut self) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | fn submit_ready_chunks(&mut self, flush_all: bool) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 162 | fn submit_chunk(&mut self, data: &[u8], direct_requested: bool) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 196 | fn wait_for_one(&mut self) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `create`, `write_at`, `bytes_written`, `flush`, and `wait_for_one` are never used [INFO] [stdout] --> src/writer.rs:218:12 [INFO] [stdout] | [INFO] [stdout] 217 | impl OffsetWriter { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 218 | pub fn create( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 241 | pub fn write_at(&mut self, offset: u64, data: &[u8]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 272 | pub fn bytes_written(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 276 | pub fn flush(&mut self) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 283 | fn wait_for_one(&mut self) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aligned_block_size` is never used [INFO] [stdout] --> src/writer.rs:304:4 [INFO] [stdout] | [INFO] [stdout] 304 | fn aligned_block_size(block_size: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `open_writer_files` is never used [INFO] [stdout] --> src/writer.rs:308:4 [INFO] [stdout] | [INFO] [stdout] 308 | fn open_writer_files( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/fro-optimize.rs:1009:21 [INFO] [stdout] | [INFO] [stdout] 1009 | .filter(|e| is_disk_backed_mount(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_disk_backed_mount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/block_hash.rs:156:40 [INFO] [stdout] | [INFO] [stdout] 156 | let mut bytes = Vec::with_capacity(values.len() * std::mem::size_of::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(values)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | if block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/bin/fro-optimize.rs:1126:17 [INFO] [stdout] | [INFO] [stdout] 1126 | let split = s_lc [INFO] [stdout] | _________________^ [INFO] [stdout] 1127 | | .find(|c: char| !c.is_ascii_digit()) [INFO] [stdout] 1128 | | .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 1128 - .unwrap_or_else(|| s_lc.len()); [INFO] [stdout] 1128 + .unwrap_or(s_lc.len()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/bin/fro-optimize.rs:1145:8 [INFO] [stdout] | [INFO] [stdout] 1145 | if align == 0 { [INFO] [stdout] | ^^^^^^^^^^ check performed here [INFO] [stdout] ... [INFO] [stdout] 1148 | bytes / align * align [INFO] [stdout] | ------------- division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/fro-optimize.rs:1266:25 [INFO] [stdout] | [INFO] [stdout] 1266 | .filter(|e| is_disk_backed_mount(e)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_disk_backed_mount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:19 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:43 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:536:1 [INFO] [stdout] | [INFO] [stdout] 536 | / fn submit_read( [INFO] [stdout] 537 | | io_uring: &mut IoUring, [INFO] [stdout] 538 | | file: &File, [INFO] [stdout] 539 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 544 | | file_size: u64, [INFO] [stdout] 545 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/block_hash.rs:572:1 [INFO] [stdout] | [INFO] [stdout] 572 | / fn thread_hash_reader( [INFO] [stdout] 573 | | thread_id: u64, [INFO] [stdout] 574 | | num_threads: u64, [INFO] [stdout] 575 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 582 | | use_direct: bool, [INFO] [stdout] 583 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:620:31 [INFO] [stdout] | [INFO] [stdout] 620 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:624:25 [INFO] [stdout] | [INFO] [stdout] 624 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:661:1 [INFO] [stdout] | [INFO] [stdout] 661 | / fn hash_file_blocks_inner( [INFO] [stdout] 662 | | filename: &str, [INFO] [stdout] 663 | | num_threads_p: u64, [INFO] [stdout] 664 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 669 | | io_mode: IOMode, [INFO] [stdout] 670 | | ) -> std::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 function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:737:1 [INFO] [stdout] | [INFO] [stdout] 737 | / pub fn hash_file_blocks( [INFO] [stdout] 738 | | filename: &str, [INFO] [stdout] 739 | | num_threads_p: u64, [INFO] [stdout] 740 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 745 | | io_mode: IOMode, [INFO] [stdout] 746 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:759:1 [INFO] [stdout] | [INFO] [stdout] 759 | / pub fn hash_file_to_replicas( [INFO] [stdout] 760 | | filename: &str, [INFO] [stdout] 761 | | hash_base: Option<&str>, [INFO] [stdout] 762 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 768 | | io_mode: IOMode, [INFO] [stdout] 769 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:787:1 [INFO] [stdout] | [INFO] [stdout] 787 | / pub fn verify_file_with_replicas( [INFO] [stdout] 788 | | filename: &str, [INFO] [stdout] 789 | | hash_base: Option<&str>, [INFO] [stdout] 790 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 796 | | io_mode: IOMode, [INFO] [stdout] 797 | | ) -> std::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: redundant closure [INFO] [stdout] --> src/bin/fro-optimize.rs:1629:49 [INFO] [stdout] | [INFO] [stdout] 1629 | for e in entries.into_iter().filter(|e| is_disk_backed_mount(e)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_disk_backed_mount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/block_hash.rs:1013:1 [INFO] [stdout] | [INFO] [stdout] 1013 | / pub fn recover_file_with_copies( [INFO] [stdout] 1014 | | target: &str, [INFO] [stdout] 1015 | | copies: &[String], [INFO] [stdout] 1016 | | hash_base: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 1024 | | recover_mode: RecoverMode, [INFO] [stdout] 1025 | | ) -> std::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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/common.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | let num_pages = (len + 4095) / 4096; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4096)` [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: this function has too many arguments (11/7) [INFO] [stdout] --> src/differ.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | / fn thread_differ( [INFO] [stdout] 13 | | thread_id: u64, [INFO] [stdout] 14 | | file1: (&File, &File), [INFO] [stdout] 15 | | file2: (&File, &File), [INFO] [stdout] ... | [INFO] [stdout] 23 | | use_direct: bool, [INFO] [stdout] 24 | | ) { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/differ.rs:47:26 [INFO] [stdout] | [INFO] [stdout] 47 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/differ.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | / if !bench_only { [INFO] [stdout] 125 | | if buffers1[idx].as_slice()[..len] != buffers2[idx].as_slice()[..len] { [INFO] [stdout] 126 | | for j in 0..len { [INFO] [stdout] 127 | | if buffers1[idx].as_slice()[j] != buffers2[idx].as_slice()[j] { [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [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] 124 ~ if !bench_only [INFO] [stdout] 125 ~ && buffers1[idx].as_slice()[..len] != buffers2[idx].as_slice()[..len] { [INFO] [stdout] 126 | for j in 0..len { [INFO] [stdout] ... [INFO] [stdout] 145 | } [INFO] [stdout] 146 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/differ.rs:164:34 [INFO] [stdout] | [INFO] [stdout] 164 | let is_aligned = (next_offset % 4096 == 0) && (next_len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/differ.rs:205:1 [INFO] [stdout] | [INFO] [stdout] 205 | / pub fn diff_files( [INFO] [stdout] 206 | | file1: &str, [INFO] [stdout] 207 | | file2: &str, [INFO] [stdout] 208 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 215 | | bench_only: bool, [INFO] [stdout] 216 | | ) -> u64 { [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/mincore.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | let len_aligned = (len + offset_diff as usize + page_size - 1) / page_size * page_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(len + offset_diff as usize).div_ceil(page_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | if params.use_direct && params.block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!params.block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:19 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:43 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 144 | / fn submit_read( [INFO] [stdout] 145 | | io_uring: &mut IoUring, [INFO] [stdout] 146 | | file: &File, [INFO] [stdout] 147 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 152 | | file_size: u64, [INFO] [stdout] 153 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:180:1 [INFO] [stdout] | [INFO] [stdout] 180 | / fn thread_reader( [INFO] [stdout] 181 | | thread_id: u64, [INFO] [stdout] 182 | | pattern: String, [INFO] [stdout] 183 | | num_threads: u64, [INFO] [stdout] ... | [INFO] [stdout] 190 | | use_direct: bool, [INFO] [stdout] 191 | | ) -> Vec { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:230:31 [INFO] [stdout] | [INFO] [stdout] 230 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:276:1 [INFO] [stdout] | [INFO] [stdout] 276 | / fn thread_loader( [INFO] [stdout] 277 | | thread_id: u64, [INFO] [stdout] 278 | | num_threads: u64, [INFO] [stdout] 279 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 286 | | use_direct: bool, [INFO] [stdout] 287 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:323:31 [INFO] [stdout] | [INFO] [stdout] 323 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:327:25 [INFO] [stdout] | [INFO] [stdout] 327 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/reader.rs:371:1 [INFO] [stdout] | [INFO] [stdout] 371 | / fn thread_map_blocks( [INFO] [stdout] 372 | | thread_id: u64, [INFO] [stdout] 373 | | num_threads: u64, [INFO] [stdout] 374 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 385 | | T: Send + 'static, [INFO] [stdout] 386 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:423:31 [INFO] [stdout] | [INFO] [stdout] 423 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:427:25 [INFO] [stdout] | [INFO] [stdout] 427 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:470:1 [INFO] [stdout] | [INFO] [stdout] 470 | / fn thread_visit_blocks( [INFO] [stdout] 471 | | thread_id: u64, [INFO] [stdout] 472 | | num_threads: u64, [INFO] [stdout] 473 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 482 | | where [INFO] [stdout] 483 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:520:31 [INFO] [stdout] | [INFO] [stdout] 520 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:524:25 [INFO] [stdout] | [INFO] [stdout] 524 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | / pub fn load_file_to_memory( [INFO] [stdout] 567 | | filename: &str, [INFO] [stdout] 568 | | num_threads_p: u64, [INFO] [stdout] 569 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 574 | | io_mode: IOMode, [INFO] [stdout] 575 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:669:1 [INFO] [stdout] | [INFO] [stdout] 669 | / pub fn map_file_blocks( [INFO] [stdout] 670 | | filename: &str, [INFO] [stdout] 671 | | num_threads_p: u64, [INFO] [stdout] 672 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 681 | | T: Send + 'static, [INFO] [stdout] 682 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:789:1 [INFO] [stdout] | [INFO] [stdout] 789 | / pub fn visit_file_blocks( [INFO] [stdout] 790 | | filename: &str, [INFO] [stdout] 791 | | num_threads_p: u64, [INFO] [stdout] 792 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 800 | | where [INFO] [stdout] 801 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [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 boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:896:21 [INFO] [stdout] | [INFO] [stdout] 896 | Ok(true) => true && io_mode != IOMode::Direct, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode != IOMode::Direct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:897:14 [INFO] [stdout] | [INFO] [stdout] 897 | _ => false || io_mode == IOMode::PageCache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode == IOMode::PageCache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:881:1 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn read_file( [INFO] [stdout] 882 | | pattern: &str, [INFO] [stdout] 883 | | filename: &str, [INFO] [stdout] 884 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 890 | | io_mode: IOMode, [INFO] [stdout] 891 | | ) -> u64 { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:46 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `start.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:67 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:45 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:67 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:356:1 [INFO] [stdout] | [INFO] [stdout] 356 | / fn thread_writer( [INFO] [stdout] 357 | | thread_id: u64, [INFO] [stdout] 358 | | source_file: Option<(&File, &File)>, [INFO] [stdout] 359 | | dest_file: (&File, &File), [INFO] [stdout] ... | [INFO] [stdout] 367 | | use_direct: bool, [INFO] [stdout] 368 | | ) { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:389:26 [INFO] [stdout] | [INFO] [stdout] 389 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:30 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `buffer_offsets[idx].is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:67 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:459:34 [INFO] [stdout] | [INFO] [stdout] 459 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:512:1 [INFO] [stdout] | [INFO] [stdout] 512 | / pub fn write_file( [INFO] [stdout] 513 | | source: Option<&str>, [INFO] [stdout] 514 | | filename: &str, [INFO] [stdout] 515 | | create_size: Option, [INFO] [stdout] ... | [INFO] [stdout] 523 | | io_mode_write: IOMode, [INFO] [stdout] 524 | | ) -> u64 { [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: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:567:14 [INFO] [stdout] | [INFO] [stdout] 567 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:624:10 [INFO] [stdout] | [INFO] [stdout] 624 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:694:10 [INFO] [stdout] | [INFO] [stdout] 694 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:378:23 [INFO] [stdout] | [INFO] [stdout] 378 | } else if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:382:16 [INFO] [stdout] | [INFO] [stdout] 382 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:388:16 [INFO] [stdout] | [INFO] [stdout] 388 | if pattern == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pattern.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:403:12 [INFO] [stdout] | [INFO] [stdout] 403 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:411:12 [INFO] [stdout] | [INFO] [stdout] 411 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:419:8 [INFO] [stdout] | [INFO] [stdout] 419 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:592:35 [INFO] [stdout] | [INFO] [stdout] 592 | } else if mode == "write" { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 593 | | write_file( [INFO] [stdout] 594 | | source, [INFO] [stdout] 595 | | filename, [INFO] [stdout] ... | [INFO] [stdout] 606 | | } else if mode == "copy" { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:606:34 [INFO] [stdout] | [INFO] [stdout] 606 | } else if mode == "copy" { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 607 | | write_file( [INFO] [stdout] 608 | | source, [INFO] [stdout] 609 | | filename, [INFO] [stdout] ... | [INFO] [stdout] 620 | | } else if mode == "diff" || mode == "dual-read-bench" { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/main.rs:684:42 [INFO] [stdout] | [INFO] [stdout] 684 | num_threads: best_params[off + 0], [INFO] [stdout] | ^^^^^^^ help: consider reducing it to: `off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `file_size` and `params` are never read [INFO] [stdout] --> src/reader.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct MappedBlocks { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 42 | pub file_size: u64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 43 | pub params: ResolvedReadParams, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MappedBlocks` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_file_blocks_for_mode` is never used [INFO] [stdout] --> src/reader.rs:763:8 [INFO] [stdout] | [INFO] [stdout] 763 | pub fn map_file_blocks_for_mode( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `visit_file_blocks_for_mode` is never used [INFO] [stdout] --> src/reader.rs:856:8 [INFO] [stdout] | [INFO] [stdout] 856 | pub fn visit_file_blocks_for_mode( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PendingOffsetWrite` is never constructed [INFO] [stdout] --> src/writer.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct PendingOffsetWrite { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OffsetWriter` is never constructed [INFO] [stdout] --> src/writer.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub struct OffsetWriter { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `open_append` is never used [INFO] [stdout] --> src/writer.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl SequentialWriter { [INFO] [stdout] | --------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn open_append( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `create`, `write_at`, `bytes_written`, `flush`, and `wait_for_one` are never used [INFO] [stdout] --> src/writer.rs:218:12 [INFO] [stdout] | [INFO] [stdout] 217 | impl OffsetWriter { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 218 | pub fn create( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 241 | pub fn write_at(&mut self, offset: u64, data: &[u8]) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 272 | pub fn bytes_written(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 276 | pub fn flush(&mut self) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 283 | fn wait_for_one(&mut self) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual slice size calculation [INFO] [stdout] --> src/block_hash.rs:156:40 [INFO] [stdout] | [INFO] [stdout] 156 | let mut bytes = Vec::with_capacity(values.len() * std::mem::size_of::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(values)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation [INFO] [stdout] = note: `#[warn(clippy::manual_slice_size_calculation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | if block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:19 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/block_hash.rs:533:43 [INFO] [stdout] | [INFO] [stdout] 533 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:536:1 [INFO] [stdout] | [INFO] [stdout] 536 | / fn submit_read( [INFO] [stdout] 537 | | io_uring: &mut IoUring, [INFO] [stdout] 538 | | file: &File, [INFO] [stdout] 539 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 544 | | file_size: u64, [INFO] [stdout] 545 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/block_hash.rs:572:1 [INFO] [stdout] | [INFO] [stdout] 572 | / fn thread_hash_reader( [INFO] [stdout] 573 | | thread_id: u64, [INFO] [stdout] 574 | | num_threads: u64, [INFO] [stdout] 575 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 582 | | use_direct: bool, [INFO] [stdout] 583 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:620:31 [INFO] [stdout] | [INFO] [stdout] 620 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/block_hash.rs:624:25 [INFO] [stdout] | [INFO] [stdout] 624 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:661:1 [INFO] [stdout] | [INFO] [stdout] 661 | / fn hash_file_blocks_inner( [INFO] [stdout] 662 | | filename: &str, [INFO] [stdout] 663 | | num_threads_p: u64, [INFO] [stdout] 664 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 669 | | io_mode: IOMode, [INFO] [stdout] 670 | | ) -> std::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 function has too many arguments (8/7) [INFO] [stdout] --> src/block_hash.rs:737:1 [INFO] [stdout] | [INFO] [stdout] 737 | / pub fn hash_file_blocks( [INFO] [stdout] 738 | | filename: &str, [INFO] [stdout] 739 | | num_threads_p: u64, [INFO] [stdout] 740 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 745 | | io_mode: IOMode, [INFO] [stdout] 746 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:759:1 [INFO] [stdout] | [INFO] [stdout] 759 | / pub fn hash_file_to_replicas( [INFO] [stdout] 760 | | filename: &str, [INFO] [stdout] 761 | | hash_base: Option<&str>, [INFO] [stdout] 762 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 768 | | io_mode: IOMode, [INFO] [stdout] 769 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/block_hash.rs:787:1 [INFO] [stdout] | [INFO] [stdout] 787 | / pub fn verify_file_with_replicas( [INFO] [stdout] 788 | | filename: &str, [INFO] [stdout] 789 | | hash_base: Option<&str>, [INFO] [stdout] 790 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 796 | | io_mode: IOMode, [INFO] [stdout] 797 | | ) -> std::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 function has too many arguments (11/7) [INFO] [stdout] --> src/block_hash.rs:1013:1 [INFO] [stdout] | [INFO] [stdout] 1013 | / pub fn recover_file_with_copies( [INFO] [stdout] 1014 | | target: &str, [INFO] [stdout] 1015 | | copies: &[String], [INFO] [stdout] 1016 | | hash_base: Option<&str>, [INFO] [stdout] ... | [INFO] [stdout] 1024 | | recover_mode: RecoverMode, [INFO] [stdout] 1025 | | ) -> std::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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/common.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | let num_pages = (len + 4095) / 4096; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4096)` [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: this function has too many arguments (11/7) [INFO] [stdout] --> src/differ.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | / fn thread_differ( [INFO] [stdout] 13 | | thread_id: u64, [INFO] [stdout] 14 | | file1: (&File, &File), [INFO] [stdout] 15 | | file2: (&File, &File), [INFO] [stdout] ... | [INFO] [stdout] 23 | | use_direct: bool, [INFO] [stdout] 24 | | ) { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/differ.rs:47:26 [INFO] [stdout] | [INFO] [stdout] 47 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/differ.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | / if !bench_only { [INFO] [stdout] 125 | | if buffers1[idx].as_slice()[..len] != buffers2[idx].as_slice()[..len] { [INFO] [stdout] 126 | | for j in 0..len { [INFO] [stdout] 127 | | if buffers1[idx].as_slice()[j] != buffers2[idx].as_slice()[j] { [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [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] 124 ~ if !bench_only [INFO] [stdout] 125 ~ && buffers1[idx].as_slice()[..len] != buffers2[idx].as_slice()[..len] { [INFO] [stdout] 126 | for j in 0..len { [INFO] [stdout] ... [INFO] [stdout] 145 | } [INFO] [stdout] 146 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/differ.rs:164:34 [INFO] [stdout] | [INFO] [stdout] 164 | let is_aligned = (next_offset % 4096 == 0) && (next_len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/differ.rs:205:1 [INFO] [stdout] | [INFO] [stdout] 205 | / pub fn diff_files( [INFO] [stdout] 206 | | file1: &str, [INFO] [stdout] 207 | | file2: &str, [INFO] [stdout] 208 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 215 | | bench_only: bool, [INFO] [stdout] 216 | | ) -> u64 { [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/mincore.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | let len_aligned = (len + offset_diff as usize + page_size - 1) / page_size * page_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(len + offset_diff as usize).div_ceil(page_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | if params.use_direct && params.block_size % 4096 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!params.block_size.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:19 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/reader.rs:141:43 [INFO] [stdout] | [INFO] [stdout] 141 | use_direct && (offset % 4096 == 0) && (len % 4096 == 0) && (offset + len as u64 <= file_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 144 | / fn submit_read( [INFO] [stdout] 145 | | io_uring: &mut IoUring, [INFO] [stdout] 146 | | file: &File, [INFO] [stdout] 147 | | file_direct: &File, [INFO] [stdout] ... | [INFO] [stdout] 152 | | file_size: u64, [INFO] [stdout] 153 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:180:1 [INFO] [stdout] | [INFO] [stdout] 180 | / fn thread_reader( [INFO] [stdout] 181 | | thread_id: u64, [INFO] [stdout] 182 | | pattern: String, [INFO] [stdout] 183 | | num_threads: u64, [INFO] [stdout] ... | [INFO] [stdout] 190 | | use_direct: bool, [INFO] [stdout] 191 | | ) -> Vec { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:230:31 [INFO] [stdout] | [INFO] [stdout] 230 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:276:1 [INFO] [stdout] | [INFO] [stdout] 276 | / fn thread_loader( [INFO] [stdout] 277 | | thread_id: u64, [INFO] [stdout] 278 | | num_threads: u64, [INFO] [stdout] 279 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 286 | | use_direct: bool, [INFO] [stdout] 287 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:323:31 [INFO] [stdout] | [INFO] [stdout] 323 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:327:25 [INFO] [stdout] | [INFO] [stdout] 327 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/reader.rs:371:1 [INFO] [stdout] | [INFO] [stdout] 371 | / fn thread_map_blocks( [INFO] [stdout] 372 | | thread_id: u64, [INFO] [stdout] 373 | | num_threads: u64, [INFO] [stdout] 374 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 385 | | T: Send + 'static, [INFO] [stdout] 386 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:423:31 [INFO] [stdout] | [INFO] [stdout] 423 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:427:25 [INFO] [stdout] | [INFO] [stdout] 427 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/reader.rs:470:1 [INFO] [stdout] | [INFO] [stdout] 470 | / fn thread_visit_blocks( [INFO] [stdout] 471 | | thread_id: u64, [INFO] [stdout] 472 | | num_threads: u64, [INFO] [stdout] 473 | | block_size: u64, [INFO] [stdout] ... | [INFO] [stdout] 482 | | where [INFO] [stdout] 483 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [INFO] [stdout] | |__________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:520:31 [INFO] [stdout] | [INFO] [stdout] 520 | let mut ready = vec![(cq.user_data() as u64, cq.result().unwrap())]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/reader.rs:524:25 [INFO] [stdout] | [INFO] [stdout] 524 | ready.push((cq.user_data() as u64, cq.result().unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `cq.user_data()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/reader.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | / pub fn load_file_to_memory( [INFO] [stdout] 567 | | filename: &str, [INFO] [stdout] 568 | | num_threads_p: u64, [INFO] [stdout] 569 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 574 | | io_mode: IOMode, [INFO] [stdout] 575 | | ) -> std::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 function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:669:1 [INFO] [stdout] | [INFO] [stdout] 669 | / pub fn map_file_blocks( [INFO] [stdout] 670 | | filename: &str, [INFO] [stdout] 671 | | num_threads_p: u64, [INFO] [stdout] 672 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 681 | | T: Send + 'static, [INFO] [stdout] 682 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result + Send + Sync + 'static, [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:789:1 [INFO] [stdout] | [INFO] [stdout] 789 | / pub fn visit_file_blocks( [INFO] [stdout] 790 | | filename: &str, [INFO] [stdout] 791 | | num_threads_p: u64, [INFO] [stdout] 792 | | block_size_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 800 | | where [INFO] [stdout] 801 | | F: for<'a> Fn(ReaderBlock<'a>) -> std::io::Result<()> + Send + Sync + 'static, [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 boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:896:21 [INFO] [stdout] | [INFO] [stdout] 896 | Ok(true) => true && io_mode != IOMode::Direct, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode != IOMode::Direct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/reader.rs:897:14 [INFO] [stdout] | [INFO] [stdout] 897 | _ => false || io_mode == IOMode::PageCache, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `io_mode == IOMode::PageCache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/reader.rs:881:1 [INFO] [stdout] | [INFO] [stdout] 881 | / pub fn read_file( [INFO] [stdout] 882 | | pattern: &str, [INFO] [stdout] 883 | | filename: &str, [INFO] [stdout] 884 | | num_threads_p: u64, [INFO] [stdout] ... | [INFO] [stdout] 890 | | io_mode: IOMode, [INFO] [stdout] 891 | | ) -> u64 { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:46 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `start.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:177:67 [INFO] [stdout] | [INFO] [stdout] 177 | let use_direct = direct_requested && start % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:45 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace with: `offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:252:67 [INFO] [stdout] | [INFO] [stdout] 252 | let use_direct = self.use_direct && offset % 4096 == 0 && data.len() % 4096 == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.len().is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:356:1 [INFO] [stdout] | [INFO] [stdout] 356 | / fn thread_writer( [INFO] [stdout] 357 | | thread_id: u64, [INFO] [stdout] 358 | | source_file: Option<(&File, &File)>, [INFO] [stdout] 359 | | dest_file: (&File, &File), [INFO] [stdout] ... | [INFO] [stdout] 367 | | use_direct: bool, [INFO] [stdout] 368 | | ) { [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:389:26 [INFO] [stdout] | [INFO] [stdout] 389 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:30 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `buffer_offsets[idx].is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:435:67 [INFO] [stdout] | [INFO] [stdout] 435 | let is_aligned = (buffer_offsets[idx] % 4096 == 0) && (len % 4096 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/writer.rs:459:34 [INFO] [stdout] | [INFO] [stdout] 459 | let is_aligned = (next_offset % 4096 == 0) && (len == block_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `next_offset.is_multiple_of(4096)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/writer.rs:512:1 [INFO] [stdout] | [INFO] [stdout] 512 | / pub fn write_file( [INFO] [stdout] 513 | | source: Option<&str>, [INFO] [stdout] 514 | | filename: &str, [INFO] [stdout] 515 | | create_size: Option, [INFO] [stdout] ... | [INFO] [stdout] 523 | | io_mode_write: IOMode, [INFO] [stdout] 524 | | ) -> u64 { [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: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:567:14 [INFO] [stdout] | [INFO] [stdout] 567 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:624:10 [INFO] [stdout] | [INFO] [stdout] 624 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/writer.rs:694:10 [INFO] [stdout] | [INFO] [stdout] 694 | .create(true) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:378:23 [INFO] [stdout] | [INFO] [stdout] 378 | } else if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:382:16 [INFO] [stdout] | [INFO] [stdout] 382 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:388:16 [INFO] [stdout] | [INFO] [stdout] 388 | if pattern == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pattern.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:403:12 [INFO] [stdout] | [INFO] [stdout] 403 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:411:12 [INFO] [stdout] | [INFO] [stdout] 411 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:419:8 [INFO] [stdout] | [INFO] [stdout] 419 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:592:35 [INFO] [stdout] | [INFO] [stdout] 592 | } else if mode == "write" { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 593 | | write_file( [INFO] [stdout] 594 | | source, [INFO] [stdout] 595 | | filename, [INFO] [stdout] ... | [INFO] [stdout] 606 | | } else if mode == "copy" { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:606:34 [INFO] [stdout] | [INFO] [stdout] 606 | } else if mode == "copy" { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 607 | | write_file( [INFO] [stdout] 608 | | source, [INFO] [stdout] 609 | | filename, [INFO] [stdout] ... | [INFO] [stdout] 620 | | } else if mode == "diff" || mode == "dual-read-bench" { [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/main.rs:684:42 [INFO] [stdout] | [INFO] [stdout] 684 | num_threads: best_params[off + 0], [INFO] [stdout] | ^^^^^^^ help: consider reducing it to: `off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.14s [INFO] running `Command { std: "docker" "inspect" "0459f9731fc65b24c8e226f140d005a0e3d53e9a818877f370433c61c42384c7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0459f9731fc65b24c8e226f140d005a0e3d53e9a818877f370433c61c42384c7", kill_on_drop: false }` [INFO] [stdout] 0459f9731fc65b24c8e226f140d005a0e3d53e9a818877f370433c61c42384c7