[INFO] cloning repository https://github.com/stanipintjuk/prime_sieve [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/stanipintjuk/prime_sieve" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fstanipintjuk%2Fprime_sieve", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fstanipintjuk%2Fprime_sieve'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e7e279c6f6f3b278cda2a4f4a9f78c5112fb33bb [INFO] linting stanipintjuk/prime_sieve against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fstanipintjuk%2Fprime_sieve" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/stanipintjuk/prime_sieve [INFO] finished tweaking git repo https://github.com/stanipintjuk/prime_sieve [INFO] tweaked toml for git repo https://github.com/stanipintjuk/prime_sieve written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/stanipintjuk/prime_sieve 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/stanipintjuk/prime_sieve 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 48ac54b8f4a15ffc8b4e6189811a062a18a8d5404ad19ce83992cd79e46e599c [INFO] running `Command { std: "docker" "start" "-a" "48ac54b8f4a15ffc8b4e6189811a062a18a8d5404ad19ce83992cd79e46e599c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "48ac54b8f4a15ffc8b4e6189811a062a18a8d5404ad19ce83992cd79e46e599c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "48ac54b8f4a15ffc8b4e6189811a062a18a8d5404ad19ce83992cd79e46e599c", kill_on_drop: false }` [INFO] [stdout] 48ac54b8f4a15ffc8b4e6189811a062a18a8d5404ad19ce83992cd79e46e599c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 15bc202961884a89bc242bbf7a92d9e56e9c0998b8128866d617ae1c8e5b0279 [INFO] running `Command { std: "docker" "start" "-a" "15bc202961884a89bc242bbf7a92d9e56e9c0998b8128866d617ae1c8e5b0279", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Checking prime_sieve v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/fs/fs.rs:55:16 [INFO] [stdout] | [INFO] [stdout] 55 | let file = try!(File::open(file_name)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fs/fs.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | file: file, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/fs/fs.rs:68:19 [INFO] [stdout] | [INFO] [stdout] 68 | Err(_) => try!(File::create(fname)), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/fs/fs.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | try!(file.write_all(&serialize_u64(p))); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/fs/fs.rs:55:16 [INFO] [stdout] | [INFO] [stdout] 55 | let file = try!(File::open(file_name)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fs/fs.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | file: file, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/fs/fs.rs:68:19 [INFO] [stdout] | [INFO] [stdout] 68 | Err(_) => try!(File::create(fname)), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/fs/fs.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | try!(file.write_all(&serialize_u64(p))); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/sieve/math/math.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | if try!(is_coprime_to_list(p as u64, init_primes)) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/sieve/math/math.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | if try!(is_coprime_to_list(p, primes_page)) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/math/math.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/math/math.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/sieve/math/math.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | if try!(is_coprime_to_list(p as u64, init_primes)) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/math/math.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | delta: delta, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `delta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/sieve/math/math.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | if try!(is_coprime_to_list(p, primes_page)) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/math/math.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/math/math.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | from: from, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/math/math.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | delta: delta, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `delta` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/pool.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | threads: threads, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `threads` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/pool.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | max_ppt: max_ppt, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `max_ppt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/sieve/pool.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | let max = try!(math::best_max_for_sieve(last_prime, self.max_ppt as u64)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ThreadError` [INFO] [stdout] --> src/sieve/mod.rs:3:51 [INFO] [stdout] | [INFO] [stdout] 3 | pub use self::pool::{ThreadPool, ThreadPoolError, ThreadError}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/pool.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | threads: threads, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `threads` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MsgFromWorker` and `MsgToWorker` [INFO] [stdout] --> src/sieve/mod.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | pub use self::worker::{MsgFromWorker, MsgToWorker}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/sieve/pool.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | max_ppt: max_ppt, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `max_ppt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: anonymous parameters are deprecated and will be removed in the next edition [INFO] [stdout] --> src/sieve/thread.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | fn send(&self, MsgToWorker) -> Result<(), SendError>; [INFO] [stdout] | ^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: MsgToWorker` [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/sieve/pool.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | let max = try!(math::best_max_for_sieve(last_prime, self.max_ppt as u64)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ThreadError` [INFO] [stdout] --> src/sieve/mod.rs:3:51 [INFO] [stdout] | [INFO] [stdout] 3 | pub use self::pool::{ThreadPool, ThreadPoolError, ThreadError}; [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 imports: `MsgFromWorker` and `MsgToWorker` [INFO] [stdout] --> src/sieve/mod.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | pub use self::worker::{MsgFromWorker, MsgToWorker}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: anonymous parameters are deprecated and will be removed in the next edition [INFO] [stdout] --> src/sieve/thread.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | fn send(&self, MsgToWorker) -> Result<(), SendError>; [INFO] [stdout] | ^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: MsgToWorker` [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:4:18 [INFO] [stdout] | [INFO] [stdout] 4 | pub const FILE: &'static str = "primes.bin"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | let mut primes_pager = try!(fs::load_primes(fname)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/config.rs:4:18 [INFO] [stdout] | [INFO] [stdout] 4 | pub const FILE: &'static str = "primes.bin"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:19:28 [INFO] [stdout] | [INFO] [stdout] 19 | let mut primes_pager = try!(fs::load_primes(fname)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:22:30 [INFO] [stdout] | [INFO] [stdout] 22 | let mut candidates = try!(thread_pool.find_candidates(init_primes)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | candidates = try!(thread_pool.sieve(page, candidates)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:22:30 [INFO] [stdout] | [INFO] [stdout] 22 | let mut candidates = try!(thread_pool.find_candidates(init_primes)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | candidates = try!(thread_pool.sieve(page, candidates)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `prime_page` [INFO] [stdout] --> src/sieve/pool.rs:94:18 [INFO] [stdout] | [INFO] [stdout] 94 | prime_page: Vec, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_prime_page` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `part` [INFO] [stdout] --> src/sieve/pool.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | for (part, thread) in threadparts {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_part` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `thread` [INFO] [stdout] --> src/sieve/pool.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | for (part, thread) in threadparts {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_thread` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `position` is never read [INFO] [stdout] --> src/fs/fs.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct PrimesPagination { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 10 | pub file: File, [INFO] [stdout] 11 | pub position: usize, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `stop` is never used [INFO] [stdout] --> src/sieve/pool.rs:105:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl ThreadPool { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 105 | pub fn stop(&self) -> Result<(), ThreadPoolError> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Sieve` and `Stop` are never constructed [INFO] [stdout] --> src/sieve/worker.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub enum MsgToWorker { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 10 | FindCandidates(ArcVec, Partition), [INFO] [stdout] 11 | Sieve(ArcVec, ArcVec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 12 | Stop, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/sieve/worker.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 17 | SieveResult(Vec), [INFO] [stdout] | ----------- ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 17 - SieveResult(Vec), [INFO] [stdout] 17 + SieveResult(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/sieve/worker.rs:18:11 [INFO] [stdout] | [INFO] [stdout] 18 | Error(MathError), [INFO] [stdout] | ----- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 18 - Error(MathError), [INFO] [stdout] 18 + Error(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Ok` is never constructed [INFO] [stdout] --> src/sieve/worker.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 15 | pub enum MsgFromWorker { [INFO] [stdout] | ------------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | Ok, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/fs/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod fs; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `prime_page` [INFO] [stdout] --> src/sieve/pool.rs:94:18 [INFO] [stdout] | [INFO] [stdout] 94 | prime_page: Vec, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_prime_page` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `part` [INFO] [stdout] --> src/sieve/pool.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | for (part, thread) in threadparts {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_part` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `thread` [INFO] [stdout] --> src/sieve/pool.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | for (part, thread) in threadparts {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_thread` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fs/fs.rs:50:35 [INFO] [stdout] | [INFO] [stdout] 50 | let mut vec = deserialize_buf(&buf, read); [INFO] [stdout] | ^^^^ help: change this to: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `arr` [INFO] [stdout] --> src/fs/serializer.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | for i in 0..SIZE { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 8 - for i in 0..SIZE { [INFO] [stdout] 8 + for in arr.iter_mut().take(SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/fs/serializer.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | num = num >> 8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `num >>= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/fs/serializer.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | num = num << 8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `num <<= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/fs/serializer.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | num = num + (arr[i] as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num += (arr[i] as u64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `position` is never read [INFO] [stdout] --> src/fs/fs.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct PrimesPagination { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 10 | pub file: File, [INFO] [stdout] 11 | pub position: usize, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `stop` is never used [INFO] [stdout] --> src/sieve/pool.rs:105:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl ThreadPool { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 105 | pub fn stop(&self) -> Result<(), ThreadPoolError> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Sieve` and `Stop` are never constructed [INFO] [stdout] --> src/sieve/worker.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 9 | pub enum MsgToWorker { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 10 | FindCandidates(ArcVec, Partition), [INFO] [stdout] 11 | Sieve(ArcVec, ArcVec), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 12 | Stop, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/sieve/worker.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 17 | SieveResult(Vec), [INFO] [stdout] | ----------- ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 17 - SieveResult(Vec), [INFO] [stdout] 17 + SieveResult(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/sieve/worker.rs:18:11 [INFO] [stdout] | [INFO] [stdout] 18 | Error(MathError), [INFO] [stdout] | ----- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 18 - Error(MathError), [INFO] [stdout] 18 + Error(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Ok` is never constructed [INFO] [stdout] --> src/sieve/worker.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 15 | pub enum MsgFromWorker { [INFO] [stdout] | ------------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | Ok, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/fs/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod fs; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/sieve/math/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod math; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing a legacy numeric constant [INFO] [stdout] --> src/sieve/math/math.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::u32::MAX as u32MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import and use the associated constant `u32::MAX` from the primitive type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/sieve/math/math.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | return Ok(true); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - return Ok(true); [INFO] [stdout] 27 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/sieve/math/math.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | if n > (u32MAX as u64) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 12 | if n > (u32::MAX as u64) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sieve/math/math.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | !(n % c == 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(n % c != 0)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fs/fs.rs:50:35 [INFO] [stdout] | [INFO] [stdout] 50 | let mut vec = deserialize_buf(&buf, read); [INFO] [stdout] | ^^^^ help: change this to: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/sieve/math/math.rs:31:6 [INFO] [stdout] | [INFO] [stdout] 31 | !(n % c == 0) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `n.is_multiple_of(c)` [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: the loop variable `i` is only used to index `arr` [INFO] [stdout] --> src/fs/serializer.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | for i in 0..SIZE { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 8 - for i in 0..SIZE { [INFO] [stdout] 8 + for in arr.iter_mut().take(SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/fs/serializer.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | num = num >> 8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `num >>= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/fs/serializer.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | num = num << 8; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `num <<= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/fs/serializer.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | num = num + (arr[i] as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `num += (arr[i] as u64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/sieve/math/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod math; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing a legacy numeric constant [INFO] [stdout] --> src/sieve/math/math.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::u32::MAX as u32MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import and use the associated constant `u32::MAX` from the primitive type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/sieve/math/math.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | const MAX: u64 = u32MAX as u64; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 104 | const MAX: u64 = u32::MAX as u64; [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/sieve/math/math.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | return Ok(true); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - return Ok(true); [INFO] [stdout] 27 + Ok(true) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/sieve/math/math.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | if n > (u32MAX as u64) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 12 | if n > (u32::MAX as u64) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: re-implementing `PartialEq::ne` is unnecessary [INFO] [stdout] --> src/sieve/math/partition.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | fn ne(&self, other: &Partition) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl [INFO] [stdout] = note: `#[warn(clippy::partialeq_ne_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sieve/math/math.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | !(n % c == 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(n % c != 0)` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/sieve/math/math.rs:31:6 [INFO] [stdout] | [INFO] [stdout] 31 | !(n % c == 0) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `n.is_multiple_of(c)` [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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/math/errors.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | &MathError::Limit(ref msg) => write!(f, "MathError::Limit({})", msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 11 - &MathError::Limit(ref msg) => write!(f, "MathError::Limit({})", msg), [INFO] [stdout] 11 + MathError::Limit(msg) => write!(f, "MathError::Limit({})", msg), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/sieve/math/math.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | const MAX: u64 = u32MAX as u64; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 104 | const MAX: u64 = u32::MAX as u64; [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sieve/pool.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sieve/pool.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/sieve/pool.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | / match thread.recv() { [INFO] [stdout] 115 | | Err(err) => errors.push(ThreadError::RecvError(err)), [INFO] [stdout] 116 | | Ok(_) => {} [INFO] [stdout] 117 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = thread.recv() { errors.push(ThreadError::RecvError(err)) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sieve/pool.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | if errors.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: re-implementing `PartialEq::ne` is unnecessary [INFO] [stdout] --> src/sieve/math/partition.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | fn ne(&self, other: &Partition) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl [INFO] [stdout] = note: `#[warn(clippy::partialeq_ne_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/pool.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | / match self { [INFO] [stdout] 148 | | &ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] 149 | | let _ = write!(f, "One or more errors occured in the thread pool \n\t"); [INFO] [stdout] 150 | | for err in errors { [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 147 ~ match *self { [INFO] [stdout] 148 ~ ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] 149 | let _ = write!(f, "One or more errors occured in the thread pool \n\t"); [INFO] [stdout] ... [INFO] [stdout] 168 | [INFO] [stdout] 169 ~ ThreadPoolError::Math(MathError::Limit(ref msg)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/pool.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | &ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 148 - &ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] 148 + ThreadPoolError::Thread(errors) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/math/errors.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | &MathError::Limit(ref msg) => write!(f, "MathError::Limit({})", msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 11 - &MathError::Limit(ref msg) => write!(f, "MathError::Limit({})", msg), [INFO] [stdout] 11 + MathError::Limit(msg) => write!(f, "MathError::Limit({})", msg), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/pool.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | let _ = match err { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 152 | | &ThreadError::RecvError(err) => { [INFO] [stdout] 153 | | write!(f, "Failed to read from a thread. Err: {}", err) [INFO] [stdout] ... | [INFO] [stdout] 164 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 151 ~ let _ = match *err { [INFO] [stdout] 152 ~ ThreadError::RecvError(err) => { [INFO] [stdout] 153 | write!(f, "Failed to read from a thread. Err: {}", err) [INFO] [stdout] 154 | } [INFO] [stdout] 155 ~ ThreadError::SendError(ref err) => { [INFO] [stdout] 156 | write!(f, "Failed to send to a thread. Err: {}", err) [INFO] [stdout] 157 | } [INFO] [stdout] 158 ~ ThreadError::UnexpectedResponse(ref req, ref resp) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/pool.rs:155:25 [INFO] [stdout] | [INFO] [stdout] 155 | &ThreadError::SendError(ref err) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 155 - &ThreadError::SendError(ref err) => { [INFO] [stdout] 155 + ThreadError::SendError(err) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/pool.rs:158:25 [INFO] [stdout] | [INFO] [stdout] 158 | &ThreadError::UnexpectedResponse(ref req, ref resp) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 158 - &ThreadError::UnexpectedResponse(ref req, ref resp) => { [INFO] [stdout] 158 + ThreadError::UnexpectedResponse(req, resp) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/sieve/worker.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / loop { [INFO] [stdout] 33 | | let msg = match rec.recv() { [INFO] [stdout] 34 | | Ok(msg) => msg, [INFO] [stdout] 35 | | Err(_) => break, [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ help: try: `while let Ok(msg) = rec.recv() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sieve/pool.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/worker.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / match self { [INFO] [stdout] 73 | | &MsgToWorker::FindCandidates(_, _) => write!(f, "FindCandidates(...)"), [INFO] [stdout] 74 | | &MsgToWorker::Sieve(_, _) => write!(f, "Sieve(...)"), [INFO] [stdout] 75 | | &MsgToWorker::Stop => write!(f, "Stop"), [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 72 ~ match *self { [INFO] [stdout] 73 ~ MsgToWorker::FindCandidates(_, _) => write!(f, "FindCandidates(...)"), [INFO] [stdout] 74 ~ MsgToWorker::Sieve(_, _) => write!(f, "Sieve(...)"), [INFO] [stdout] 75 ~ MsgToWorker::Stop => write!(f, "Stop"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/worker.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / match self { [INFO] [stdout] 83 | | &MsgFromWorker::CandidatesResult(_) => write!(f, "CandidatesResult(...)"), [INFO] [stdout] 84 | | &MsgFromWorker::SieveResult(_) => write!(f, "SieveResult(...)"), [INFO] [stdout] 85 | | &MsgFromWorker::Error(_) => write!(f, "Error(...)"), [INFO] [stdout] 86 | | &MsgFromWorker::Ok => write!(f, "Ok"), [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 82 ~ match *self { [INFO] [stdout] 83 ~ MsgFromWorker::CandidatesResult(_) => write!(f, "CandidatesResult(...)"), [INFO] [stdout] 84 ~ MsgFromWorker::SieveResult(_) => write!(f, "SieveResult(...)"), [INFO] [stdout] 85 ~ MsgFromWorker::Error(_) => write!(f, "Error(...)"), [INFO] [stdout] 86 ~ MsgFromWorker::Ok => write!(f, "Ok"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sieve/pool.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/sieve/pool.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | / match thread.recv() { [INFO] [stdout] 115 | | Err(err) => errors.push(ThreadError::RecvError(err)), [INFO] [stdout] 116 | | Ok(_) => {} [INFO] [stdout] 117 | | } [INFO] [stdout] | |_____________^ help: try: `if let Err(err) = thread.recv() { errors.push(ThreadError::RecvError(err)) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sieve/pool.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | if errors.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:21:32 [INFO] [stdout] | [INFO] [stdout] 21 | if let Some(init_primes) = (&mut primes_pager).next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `primes_pager` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/pool.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | / match self { [INFO] [stdout] 148 | | &ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] 149 | | let _ = write!(f, "One or more errors occured in the thread pool \n\t"); [INFO] [stdout] 150 | | for err in errors { [INFO] [stdout] ... | [INFO] [stdout] 172 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 147 ~ match *self { [INFO] [stdout] 148 ~ ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] 149 | let _ = write!(f, "One or more errors occured in the thread pool \n\t"); [INFO] [stdout] ... [INFO] [stdout] 168 | [INFO] [stdout] 169 ~ ThreadPoolError::Math(MathError::Limit(ref msg)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/pool.rs:148:13 [INFO] [stdout] | [INFO] [stdout] 148 | &ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 148 - &ThreadPoolError::Thread(ref errors) => { [INFO] [stdout] 148 + ThreadPoolError::Thread(errors) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/pool.rs:151:29 [INFO] [stdout] | [INFO] [stdout] 151 | let _ = match err { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 152 | | &ThreadError::RecvError(err) => { [INFO] [stdout] 153 | | write!(f, "Failed to read from a thread. Err: {}", err) [INFO] [stdout] ... | [INFO] [stdout] 164 | | }; [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 151 ~ let _ = match *err { [INFO] [stdout] 152 ~ ThreadError::RecvError(err) => { [INFO] [stdout] 153 | write!(f, "Failed to read from a thread. Err: {}", err) [INFO] [stdout] 154 | } [INFO] [stdout] 155 ~ ThreadError::SendError(ref err) => { [INFO] [stdout] 156 | write!(f, "Failed to send to a thread. Err: {}", err) [INFO] [stdout] 157 | } [INFO] [stdout] 158 ~ ThreadError::UnexpectedResponse(ref req, ref resp) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/pool.rs:155:25 [INFO] [stdout] | [INFO] [stdout] 155 | &ThreadError::SendError(ref err) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 155 - &ThreadError::SendError(ref err) => { [INFO] [stdout] 155 + ThreadError::SendError(err) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/sieve/pool.rs:158:25 [INFO] [stdout] | [INFO] [stdout] 158 | &ThreadError::UnexpectedResponse(ref req, ref resp) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 158 - &ThreadError::UnexpectedResponse(ref req, ref resp) => { [INFO] [stdout] 158 + ThreadError::UnexpectedResponse(req, resp) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / match self { [INFO] [stdout] 83 | | &SieveError::PrimesFileEmpty => { [INFO] [stdout] 84 | | write!(f, [INFO] [stdout] 85 | | "The primes file was loaded but didn't contain any numbers.") [INFO] [stdout] ... | [INFO] [stdout] 88 | | &SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] 89 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 82 ~ match *self { [INFO] [stdout] 83 ~ SieveError::PrimesFileEmpty => { [INFO] [stdout] 84 | write!(f, [INFO] [stdout] 85 | "The primes file was loaded but didn't contain any numbers.") [INFO] [stdout] 86 | } [INFO] [stdout] 87 ~ SieveError::IO(ref err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] 88 ~ SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | &SieveError::IO(ref err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 87 - &SieveError::IO(ref err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] 87 + SieveError::IO(err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | &SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 88 - &SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] 88 + SieveError::Thread(error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/sieve/worker.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / loop { [INFO] [stdout] 33 | | let msg = match rec.recv() { [INFO] [stdout] 34 | | Ok(msg) => msg, [INFO] [stdout] 35 | | Err(_) => break, [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ help: try: `while let Ok(msg) = rec.recv() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/worker.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / match self { [INFO] [stdout] 73 | | &MsgToWorker::FindCandidates(_, _) => write!(f, "FindCandidates(...)"), [INFO] [stdout] 74 | | &MsgToWorker::Sieve(_, _) => write!(f, "Sieve(...)"), [INFO] [stdout] 75 | | &MsgToWorker::Stop => write!(f, "Stop"), [INFO] [stdout] 76 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 72 ~ match *self { [INFO] [stdout] 73 ~ MsgToWorker::FindCandidates(_, _) => write!(f, "FindCandidates(...)"), [INFO] [stdout] 74 ~ MsgToWorker::Sieve(_, _) => write!(f, "Sieve(...)"), [INFO] [stdout] 75 ~ MsgToWorker::Stop => write!(f, "Stop"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/sieve/worker.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / match self { [INFO] [stdout] 83 | | &MsgFromWorker::CandidatesResult(_) => write!(f, "CandidatesResult(...)"), [INFO] [stdout] 84 | | &MsgFromWorker::SieveResult(_) => write!(f, "SieveResult(...)"), [INFO] [stdout] 85 | | &MsgFromWorker::Error(_) => write!(f, "Error(...)"), [INFO] [stdout] 86 | | &MsgFromWorker::Ok => write!(f, "Ok"), [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 82 ~ match *self { [INFO] [stdout] 83 ~ MsgFromWorker::CandidatesResult(_) => write!(f, "CandidatesResult(...)"), [INFO] [stdout] 84 ~ MsgFromWorker::SieveResult(_) => write!(f, "SieveResult(...)"), [INFO] [stdout] 85 ~ MsgFromWorker::Error(_) => write!(f, "Error(...)"), [INFO] [stdout] 86 ~ MsgFromWorker::Ok => write!(f, "Ok"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/main.rs:21:32 [INFO] [stdout] | [INFO] [stdout] 21 | if let Some(init_primes) = (&mut primes_pager).next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `primes_pager` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | / match self { [INFO] [stdout] 83 | | &SieveError::PrimesFileEmpty => { [INFO] [stdout] 84 | | write!(f, [INFO] [stdout] 85 | | "The primes file was loaded but didn't contain any numbers.") [INFO] [stdout] ... | [INFO] [stdout] 88 | | &SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] 89 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 82 ~ match *self { [INFO] [stdout] 83 ~ SieveError::PrimesFileEmpty => { [INFO] [stdout] 84 | write!(f, [INFO] [stdout] 85 | "The primes file was loaded but didn't contain any numbers.") [INFO] [stdout] 86 | } [INFO] [stdout] 87 ~ SieveError::IO(ref err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] 88 ~ SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | &SieveError::IO(ref err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 87 - &SieveError::IO(ref err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] 87 + SieveError::IO(err) => write!(f, "IO Error: \n\t{}", err), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/main.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | &SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 88 - &SieveError::Thread(ref error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] 88 + SieveError::Thread(error) => write!(f, "Error in thread pool\n\t{}", error), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.30s [INFO] running `Command { std: "docker" "inspect" "15bc202961884a89bc242bbf7a92d9e56e9c0998b8128866d617ae1c8e5b0279", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "15bc202961884a89bc242bbf7a92d9e56e9c0998b8128866d617ae1c8e5b0279", kill_on_drop: false }` [INFO] [stdout] 15bc202961884a89bc242bbf7a92d9e56e9c0998b8128866d617ae1c8e5b0279