[INFO] fetching crate desync 0.9.0... [INFO] linting desync-0.9.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate desync 0.9.0 into /workspace/builds/worker-6-tc1/source [INFO] started tweaking crates.io crate desync 0.9.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate desync 0.9.0 [INFO] tweaked toml for crates.io crate desync 0.9.0 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate desync 0.9.0 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 crates.io crate desync 0.9.0 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] Downloading crates ... [INFO] [stderr] Downloaded wasm-bindgen-test v0.3.50 [INFO] [stderr] Downloaded wasm-bindgen-test-macro v0.3.50 [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] 4786b71db9769e606c1bcbc3c6e3dd256d1e6a7fb807bc12695b806c744207c2 [INFO] running `Command { std: "docker" "start" "-a" "4786b71db9769e606c1bcbc3c6e3dd256d1e6a7fb807bc12695b806c744207c2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4786b71db9769e606c1bcbc3c6e3dd256d1e6a7fb807bc12695b806c744207c2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4786b71db9769e606c1bcbc3c6e3dd256d1e6a7fb807bc12695b806c744207c2", kill_on_drop: false }` [INFO] [stdout] 4786b71db9769e606c1bcbc3c6e3dd256d1e6a7fb807bc12695b806c744207c2 [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] e5fddae472e4f02cb83d12d3df4d971681fcdd16bf006c316c52e50c88100b2d [INFO] running `Command { std: "docker" "start" "-a" "e5fddae472e4f02cb83d12d3df4d971681fcdd16bf006c316c52e50c88100b2d", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.100 [INFO] [stderr] Compiling wasm-bindgen v0.2.100 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.100 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling wasm-bindgen-test-macro v0.3.50 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.100 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.100 [INFO] [stderr] Checking js-sys v0.3.77 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking desync v0.9.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/scheduler/sync_future.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | scheduler_future: scheduler_future, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `scheduler_future` [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: redundant field names in struct initialization [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | thread: thread [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `thread` [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/desync.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | queue: queue, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `queue` [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: you should consider adding a `Default` implementation for `Scheduler` [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn new() -> Scheduler { [INFO] [stdout] 66 | | let core = SchedulerCore { [INFO] [stdout] 67 | | schedule: Arc::new(Mutex::new(VecDeque::new())), [INFO] [stdout] 68 | | threads: Mutex::new(vec![]), [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 59 + impl Default for Scheduler { [INFO] [stdout] 60 + fn default() -> Self { [INFO] [stdout] 61 + Self::new() [INFO] [stdout] 62 + } [INFO] [stdout] 63 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | { *self.core.max_threads.lock().expect("Max threads lock") = max_threads }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `*self.core.max_threads.lock().expect("Max threads lock") = max_threads;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 150 | let new_queue = Arc::new(JobQueue::new()); [INFO] [stdout] | ------------------------------------------ unnecessary `let` binding [INFO] [stdout] 151 | new_queue [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 150 ~ [INFO] [stdout] 151 ~ Arc::new(JobQueue::new()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:160:46 [INFO] [stdout] | [INFO] [stdout] 160 | pub fn r#async ()>(&self, queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:168:45 [INFO] [stdout] | [INFO] [stdout] 168 | pub fn desync ()>(&self, queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:358:44 [INFO] [stdout] | [INFO] [stdout] 358 | let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 358 - let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] 358 + let _active = ActiveQueue { queue: queue }; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 358 | let _active = ActiveQueue { queue: &**queue }; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:379:44 [INFO] [stdout] | [INFO] [stdout] 379 | let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 379 - let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] 379 + let _active = ActiveQueue { queue: queue }; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 379 | let _active = ActiveQueue { queue: &**queue }; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:534:24 [INFO] [stdout] | [INFO] [stdout] 534 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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/scheduler/desync_scheduler.rs:583:24 [INFO] [stdout] | [INFO] [stdout] 583 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:603:52 [INFO] [stdout] | [INFO] [stdout] 603 | pub (crate) fn sync_no_panic ()>(&self, queue: &Arc, job: TFn) -> bool { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:632:24 [INFO] [stdout] | [INFO] [stdout] 632 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:654:55 [INFO] [stdout] | [INFO] [stdout] 654 | ... let busyness:String = threads.iter().map(|&(ref busy, _)| { if *busy.lock().expect("Thread busy lock") { 'B' } else { 'I' } }... [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] 654 - let busyness:String = threads.iter().map(|&(ref busy, _)| { if *busy.lock().expect("Thread busy lock") { 'B' } else { 'I' } }).collect(); [INFO] [stdout] 654 + let busyness:String = threads.iter().map(|(busy, _)| { if *busy.lock().expect("Thread busy lock") { 'B' } else { 'I' } }).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:683:42 [INFO] [stdout] | [INFO] [stdout] 683 | pub fn r#async ()>(queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:690:41 [INFO] [stdout] | [INFO] [stdout] 690 | pub fn desync ()>(queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/core.rs:111:24 [INFO] [stdout] | [INFO] [stdout] 111 | if core.queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!core.queue.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: unneeded unit return type [INFO] [stdout] --> src/scheduler/core.rs:218:49 [INFO] [stdout] | [INFO] [stdout] 218 | RunJob: 'static + Send + Fn(JobData) -> (), [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/scheduler/core.rs:228:13 [INFO] [stdout] | [INFO] [stdout] 228 | for &(ref busy_rc, ref thread) in threads.iter() { [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] 228 - for &(ref busy_rc, ref thread) in threads.iter() { [INFO] [stdout] 228 + for (busy_rc, thread) in threads.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/job.rs:19:25 [INFO] [stdout] | [INFO] [stdout] 19 | where TFn: Send+FnOnce() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/job.rs:26:25 [INFO] [stdout] | [INFO] [stdout] 26 | where TFn: Send+FnOnce() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ready()` [INFO] [stdout] --> src/scheduler/sync_future.rs:139:28 [INFO] [stdout] | [INFO] [stdout] 139 | if let Poll::Ready(_) = self.scheduler_future.poll_unpin(context) { [INFO] [stdout] | -------^^^^^^^^^^^^^^-------------------------------------------- help: try: `if self.scheduler_future.poll_unpin(context).is_ready()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scheduler/unsafe_job.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | pub unsafe fn new<'a>(action: &'a mut dyn ScheduledJob) -> UnsafeJob { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 23 - pub unsafe fn new<'a>(action: &'a mut dyn ScheduledJob) -> UnsafeJob { [INFO] [stdout] 23 + pub unsafe fn new(action: &mut dyn ScheduledJob) -> UnsafeJob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/scheduler/unsafe_job.rs:28:34 [INFO] [stdout] | [INFO] [stdout] 28 | UnsafeJob { action: mem::transmute(action_ptr), on_finish: None } [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*mut dyn scheduler::job::ScheduledJob, *mut dyn scheduler::job::ScheduledJob>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scheduler/unsafe_job.rs:34:41 [INFO] [stdout] | [INFO] [stdout] 34 | pub unsafe fn new_with_notification<'a>(action: &'a mut dyn ScheduledJob, on_finish: Arc, is_finished: Arc>... [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 34 - pub unsafe fn new_with_notification<'a>(action: &'a mut dyn ScheduledJob, on_finish: Arc, is_finished: Arc>) -> UnsafeJob { [INFO] [stdout] 34 + pub unsafe fn new_with_notification(action: &mut dyn ScheduledJob, on_finish: Arc, is_finished: Arc>) -> UnsafeJob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/scheduler/unsafe_job.rs:39:34 [INFO] [stdout] | [INFO] [stdout] 39 | UnsafeJob { action: mem::transmute(action_ptr), on_finish: Some((on_finish, is_finished)) } [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*mut dyn scheduler::job::ScheduledJob, *mut dyn scheduler::job::ScheduledJob>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:13:62 [INFO] [stdout] | [INFO] [stdout] 13 | fn wrap_fnonce ()>(job: TFn) -> impl FnMut() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:13:29 [INFO] [stdout] | [INFO] [stdout] 13 | fn wrap_fnonce ()>(job: TFn) -> impl FnMut() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | jobs: Sender ()+Send>>, [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:44:34 [INFO] [stdout] | [INFO] [stdout] 44 | let (jobs_in, jobs_out): (Sender ()+Send>>, Receiver ()+Send>>) = channel(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:44:57 [INFO] [stdout] | [INFO] [stdout] 44 | let (jobs_in, jobs_out): (Sender ()+Send>>, Receiver ()+Send>>) = channel(); [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:44:96 [INFO] [stdout] | [INFO] [stdout] 44 | let (jobs_in, jobs_out): (Sender ()+Send>>, Receiver ()+Send>>) = channel(); [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn run ()+Send>(&self, job: Job) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/job_queue.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 79 - to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] 79 + if let Some(to_wake) = to_wake { to_wake.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 103 - to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] 103 + if let Some(to_wake) = to_wake { to_wake.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/scheduler/scheduler_future.rs:203:17 [INFO] [stdout] | [INFO] [stdout] 202 | let waker = future_result.waker.take(); [INFO] [stdout] | --------------------------------------- unnecessary `let` binding [INFO] [stdout] 203 | waker [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 202 ~ [INFO] [stdout] 203 ~ future_result.waker.take() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | waker.map(|waker| waker.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 211 - waker.map(|waker| waker.wake()); [INFO] [stdout] 211 + if let Some(waker) = waker { waker.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | waker.map(|waker| waker.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 231 - waker.map(|waker| waker.wake()); [INFO] [stdout] 231 + if let Some(waker) = waker { waker.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scheduler/scheduler_future.rs:300:13 [INFO] [stdout] | [INFO] [stdout] 300 | return result; [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] 300 - return result; [INFO] [stdout] 300 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scheduler/scheduler_future.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | return Err(oneshot::Canceled); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 - return Err(oneshot::Canceled); [INFO] [stdout] 304 + Err(oneshot::Canceled) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/scheduler/scheduler_future.rs:324:16 [INFO] [stdout] | [INFO] [stdout] 324 | if !result.is_none() { break; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `result.is_some()` [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: called `unwrap` on `result` after checking its variant with `is_some` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:362:54 [INFO] [stdout] | [INFO] [stdout] 350 | if result.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = result` [INFO] [stdout] ... [INFO] [stdout] 362 | return task::Poll::Ready(result.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/scheduler/scheduler_future.rs:315:48 [INFO] [stdout] | [INFO] [stdout] 315 | let _active = ActiveQueue { queue: &*self.queue }; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/scheduler/try_sync_error.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | impl Into for TrySyncError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 12 ~ impl From for ErrorKind { [INFO] [stdout] 13 ~ fn from(val: TrySyncError) -> Self { [INFO] [stdout] 14 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/desync.rs:76:43 [INFO] [stdout] | [INFO] [stdout] 76 | where TFn: 'static+Send+FnOnce(&mut T) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/desync.rs:89:43 [INFO] [stdout] | [INFO] [stdout] 89 | where TFn: 'static+Send+FnOnce(&mut T) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/desync.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 106 | / let result = { [INFO] [stdout] 107 | | // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 108 | | // Exclusivity is guaranteed because the queue executes only one task at a time [INFO] [stdout] 109 | | let data = DataRef::(self.data); [INFO] [stdout] ... | [INFO] [stdout] 114 | | }) [INFO] [stdout] 115 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 116 | [INFO] [stdout] 117 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 106 ~ [INFO] [stdout] 107 | [INFO] [stdout] 108 ~ { [INFO] [stdout] 109 + // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 110 + // Exclusivity is guaranteed because the queue executes only one task at a time [INFO] [stdout] 111 + let data = DataRef::(self.data); [INFO] [stdout] 112 + [INFO] [stdout] 113 + sync(&self.queue, move || { [INFO] [stdout] 114 + let data = data.0; [INFO] [stdout] 115 + job(unsafe { &mut *data }) [INFO] [stdout] 116 + }) [INFO] [stdout] 117 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/desync.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 125 | / let result = { [INFO] [stdout] 126 | | // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 127 | | let data = DataRef::(self.data); [INFO] [stdout] ... | [INFO] [stdout] 132 | | }) [INFO] [stdout] 133 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 134 | [INFO] [stdout] 135 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 125 ~ [INFO] [stdout] 126 | [INFO] [stdout] 127 ~ { [INFO] [stdout] 128 + // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 129 + let data = DataRef::(self.data); [INFO] [stdout] 130 + [INFO] [stdout] 131 + try_sync(&self.queue, move || { [INFO] [stdout] 132 + let data = data.0; [INFO] [stdout] 133 + job(unsafe { &mut *data }) [INFO] [stdout] 134 + }) [INFO] [stdout] 135 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this async expression only awaits a single future [INFO] [stdout] --> src/desync.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | / async { [INFO] [stdout] 188 | | job.await [INFO] [stdout] 189 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `job` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block [INFO] [stdout] = note: `#[warn(clippy::redundant_async_block)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this async expression only awaits a single future [INFO] [stdout] --> src/desync.rs:224:13 [INFO] [stdout] | [INFO] [stdout] 224 | / async { [INFO] [stdout] 225 | | job.await [INFO] [stdout] 226 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `job` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/pipe.rs:219:46 [INFO] [stdout] | [INFO] [stdout] 219 | let process_future = (&mut *process.lock().unwrap())(core, next); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*process.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pipe.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | return false; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 383 - return false; [INFO] [stdout] 383 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:328:21 [INFO] [stdout] | [INFO] [stdout] 328 | notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 328 - notify.map(|notify| notify.wake()); [INFO] [stdout] 328 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:359:29 [INFO] [stdout] | [INFO] [stdout] 359 | ... notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 359 - notify.map(|notify| notify.wake()); [INFO] [stdout] 359 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/pipe.rs:367:45 [INFO] [stdout] | [INFO] [stdout] 367 | ... let next_item = (&mut *process.lock().unwrap())(core, next); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*process.lock().unwrap())` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:377:29 [INFO] [stdout] | [INFO] [stdout] 377 | ... notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 377 - notify.map(|notify| notify.wake()); [INFO] [stdout] 377 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pipe.rs:428:46 [INFO] [stdout] | [INFO] [stdout] 428 | on_drop: Option ()>> [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pipe.rs:435:47 [INFO] [stdout] | [INFO] [stdout] 435 | fn new ()>(on_drop: FnOnDrop) -> PipeStream { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:471:9 [INFO] [stdout] | [INFO] [stdout] 471 | core.notify_stream_closed.take().map(|notify_stream_closed| notify_stream_closed.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 471 - core.notify_stream_closed.take().map(|notify_stream_closed| notify_stream_closed.wake()); [INFO] [stdout] 471 + if let Some(notify_stream_closed) = core.notify_stream_closed.take() { notify_stream_closed.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:474:9 [INFO] [stdout] | [INFO] [stdout] 474 | / self.on_drop.take().map(|mut on_drop| { [INFO] [stdout] 475 | | REFERENCE_CHUTE.desync(move |_| { [INFO] [stdout] 476 | | (on_drop)() [INFO] [stdout] 477 | | }) [INFO] [stdout] 478 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 474 ~ if let Some(mut on_drop) = self.on_drop.take() { REFERENCE_CHUTE.desync(move |_| { [INFO] [stdout] 475 + (on_drop)() [INFO] [stdout] 476 + }) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:508:9 [INFO] [stdout] | [INFO] [stdout] 508 | notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 508 - notify.map(|notify| notify.wake()); [INFO] [stdout] 508 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking wasm-bindgen-futures v0.4.50 [INFO] [stderr] Checking wasm-bindgen-test v0.3.50 [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> tests/timeout.rs:10:42 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn timeout ()>(action: TFn, millis: u64) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/scheduler/sync_future.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | scheduler_future: scheduler_future, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `scheduler_future` [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: redundant field names in struct initialization [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | thread: thread [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `thread` [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/desync.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | queue: queue, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `queue` [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: unneeded unit return type [INFO] [stdout] --> tests/timeout.rs:10:42 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn timeout ()>(action: TFn, millis: u64) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> tests/desync_background_blocking.rs:48:34 [INFO] [stdout] | [INFO] [stdout] 48 | let background_desyncs = (0..100).into_iter().map(|_| Arc::new(Desync::new(()))).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..100)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> tests/pipe.rs:157:17 [INFO] [stdout] | [INFO] [stdout] 157 | assert!(pipe_out_with_closed_stream.next().await == None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `pipe_out_with_closed_stream.next().await.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> tests/pipe.rs:181:17 [INFO] [stdout] | [INFO] [stdout] 181 | iter = iter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `iter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> tests/pipe.rs:198:13 [INFO] [stdout] | [INFO] [stdout] 198 | iter = iter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `iter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Scheduler` [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn new() -> Scheduler { [INFO] [stdout] 66 | | let core = SchedulerCore { [INFO] [stdout] 67 | | schedule: Arc::new(Mutex::new(VecDeque::new())), [INFO] [stdout] 68 | | threads: Mutex::new(vec![]), [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 59 + impl Default for Scheduler { [INFO] [stdout] 60 + fn default() -> Self { [INFO] [stdout] 61 + Self::new() [INFO] [stdout] 62 + } [INFO] [stdout] 63 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | { *self.core.max_threads.lock().expect("Max threads lock") = max_threads }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `*self.core.max_threads.lock().expect("Max threads lock") = max_threads;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 150 | let new_queue = Arc::new(JobQueue::new()); [INFO] [stdout] | ------------------------------------------ unnecessary `let` binding [INFO] [stdout] 151 | new_queue [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 150 ~ [INFO] [stdout] 151 ~ Arc::new(JobQueue::new()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:160:46 [INFO] [stdout] | [INFO] [stdout] 160 | pub fn r#async ()>(&self, queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:168:45 [INFO] [stdout] | [INFO] [stdout] 168 | pub fn desync ()>(&self, queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:358:44 [INFO] [stdout] | [INFO] [stdout] 358 | let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 358 - let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] 358 + let _active = ActiveQueue { queue: queue }; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 358 | let _active = ActiveQueue { queue: &**queue }; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:379:44 [INFO] [stdout] | [INFO] [stdout] 379 | let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 379 - let _active = ActiveQueue { queue: &*queue }; [INFO] [stdout] 379 + let _active = ActiveQueue { queue: queue }; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 379 | let _active = ActiveQueue { queue: &**queue }; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:534:24 [INFO] [stdout] | [INFO] [stdout] 534 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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/scheduler/desync_scheduler.rs:583:24 [INFO] [stdout] | [INFO] [stdout] 583 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:603:52 [INFO] [stdout] | [INFO] [stdout] 603 | pub (crate) fn sync_no_panic ()>(&self, queue: &Arc, job: TFn) -> bool { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:632:24 [INFO] [stdout] | [INFO] [stdout] 632 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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: unneeded unit return type [INFO] [stdout] --> tests/scheduler/timeout.rs:10:42 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn timeout ()>(action: TFn, millis: u64) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:654:55 [INFO] [stdout] | [INFO] [stdout] 654 | ... let busyness:String = threads.iter().map(|&(ref busy, _)| { if *busy.lock().expect("Thread busy lock") { 'B' } else { 'I' } }... [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] 654 - let busyness:String = threads.iter().map(|&(ref busy, _)| { if *busy.lock().expect("Thread busy lock") { 'B' } else { 'I' } }).collect(); [INFO] [stdout] 654 + let busyness:String = threads.iter().map(|(busy, _)| { if *busy.lock().expect("Thread busy lock") { 'B' } else { 'I' } }).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:683:42 [INFO] [stdout] | [INFO] [stdout] 683 | pub fn r#async ()>(queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/desync_scheduler.rs:690:41 [INFO] [stdout] | [INFO] [stdout] 690 | pub fn desync ()>(queue: &Arc, job: TFn) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/core.rs:111:24 [INFO] [stdout] | [INFO] [stdout] 111 | if core.queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!core.queue.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: unneeded unit return type [INFO] [stdout] --> src/scheduler/core.rs:218:49 [INFO] [stdout] | [INFO] [stdout] 218 | RunJob: 'static + Send + Fn(JobData) -> (), [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/scheduler/core.rs:228:13 [INFO] [stdout] | [INFO] [stdout] 228 | for &(ref busy_rc, ref thread) in threads.iter() { [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] 228 - for &(ref busy_rc, ref thread) in threads.iter() { [INFO] [stdout] 228 + for (busy_rc, thread) in threads.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/job.rs:19:25 [INFO] [stdout] | [INFO] [stdout] 19 | where TFn: Send+FnOnce() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/job.rs:26:25 [INFO] [stdout] | [INFO] [stdout] 26 | where TFn: Send+FnOnce() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ready()` [INFO] [stdout] --> src/scheduler/sync_future.rs:139:28 [INFO] [stdout] | [INFO] [stdout] 139 | if let Poll::Ready(_) = self.scheduler_future.poll_unpin(context) { [INFO] [stdout] | -------^^^^^^^^^^^^^^-------------------------------------------- help: try: `if self.scheduler_future.poll_unpin(context).is_ready()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scheduler/unsafe_job.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | pub unsafe fn new<'a>(action: &'a mut dyn ScheduledJob) -> UnsafeJob { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 23 - pub unsafe fn new<'a>(action: &'a mut dyn ScheduledJob) -> UnsafeJob { [INFO] [stdout] 23 + pub unsafe fn new(action: &mut dyn ScheduledJob) -> UnsafeJob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/scheduler/unsafe_job.rs:28:34 [INFO] [stdout] | [INFO] [stdout] 28 | UnsafeJob { action: mem::transmute(action_ptr), on_finish: None } [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*mut dyn scheduler::job::ScheduledJob, *mut dyn scheduler::job::ScheduledJob>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/scheduler/unsafe_job.rs:34:41 [INFO] [stdout] | [INFO] [stdout] 34 | pub unsafe fn new_with_notification<'a>(action: &'a mut dyn ScheduledJob, on_finish: Arc, is_finished: Arc>... [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 34 - pub unsafe fn new_with_notification<'a>(action: &'a mut dyn ScheduledJob, on_finish: Arc, is_finished: Arc>) -> UnsafeJob { [INFO] [stdout] 34 + pub unsafe fn new_with_notification(action: &mut dyn ScheduledJob, on_finish: Arc, is_finished: Arc>) -> UnsafeJob { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/scheduler/unsafe_job.rs:39:34 [INFO] [stdout] | [INFO] [stdout] 39 | UnsafeJob { action: mem::transmute(action_ptr), on_finish: Some((on_finish, is_finished)) } [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*mut dyn scheduler::job::ScheduledJob, *mut dyn scheduler::job::ScheduledJob>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:13:62 [INFO] [stdout] | [INFO] [stdout] 13 | fn wrap_fnonce ()>(job: TFn) -> impl FnMut() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:13:29 [INFO] [stdout] | [INFO] [stdout] 13 | fn wrap_fnonce ()>(job: TFn) -> impl FnMut() -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | jobs: Sender ()+Send>>, [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:44:34 [INFO] [stdout] | [INFO] [stdout] 44 | let (jobs_in, jobs_out): (Sender ()+Send>>, Receiver ()+Send>>) = channel(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:44:57 [INFO] [stdout] | [INFO] [stdout] 44 | let (jobs_in, jobs_out): (Sender ()+Send>>, Receiver ()+Send>>) = channel(); [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:44:96 [INFO] [stdout] | [INFO] [stdout] 44 | let (jobs_in, jobs_out): (Sender ()+Send>>, Receiver ()+Send>>) = channel(); [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/scheduler/scheduler_thread.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn run ()+Send>(&self, job: Job) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> tests/scheduler/asynchronous.rs:156:17 [INFO] [stdout] | [INFO] [stdout] 156 | assert!(rx.recv().unwrap() == true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rx.recv().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/scheduler/job_queue.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | if core.queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `core.queue.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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 79 - to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] 79 + if let Some(to_wake) = to_wake { to_wake.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 103 - to_wake.map(|to_wake| to_wake.wake()); [INFO] [stdout] 103 + if let Some(to_wake) = to_wake { to_wake.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/scheduler/scheduler_future.rs:203:17 [INFO] [stdout] | [INFO] [stdout] 202 | let waker = future_result.waker.take(); [INFO] [stdout] | --------------------------------------- unnecessary `let` binding [INFO] [stdout] 203 | waker [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 202 ~ [INFO] [stdout] 203 ~ future_result.waker.take() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | waker.map(|waker| waker.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 211 - waker.map(|waker| waker.wake()); [INFO] [stdout] 211 + if let Some(waker) = waker { waker.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | waker.map(|waker| waker.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 231 - waker.map(|waker| waker.wake()); [INFO] [stdout] 231 + if let Some(waker) = waker { waker.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scheduler/scheduler_future.rs:300:13 [INFO] [stdout] | [INFO] [stdout] 300 | return result; [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] 300 - return result; [INFO] [stdout] 300 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scheduler/scheduler_future.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | return Err(oneshot::Canceled); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 - return Err(oneshot::Canceled); [INFO] [stdout] 304 + Err(oneshot::Canceled) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/scheduler/scheduler_future.rs:324:16 [INFO] [stdout] | [INFO] [stdout] 324 | if !result.is_none() { break; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `result.is_some()` [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: called `unwrap` on `result` after checking its variant with `is_some` [INFO] [stdout] --> src/scheduler/scheduler_future.rs:362:54 [INFO] [stdout] | [INFO] [stdout] 350 | if result.is_some() { [INFO] [stdout] | ------------------- help: try: `if let Some() = result` [INFO] [stdout] ... [INFO] [stdout] 362 | return task::Poll::Ready(result.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/scheduler/scheduler_future.rs:315:48 [INFO] [stdout] | [INFO] [stdout] 315 | let _active = ActiveQueue { queue: &*self.queue }; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&self.queue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> tests/scheduler/future_desync.rs:248:13 [INFO] [stdout] | [INFO] [stdout] 248 | assert!((*wake2.awake.lock().unwrap()) == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(*wake2.awake.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> tests/scheduler/future_desync.rs:249:13 [INFO] [stdout] | [INFO] [stdout] 249 | assert!((*wake1.awake.lock().unwrap()) == true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*wake1.awake.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> tests/scheduler/future_desync.rs:270:13 [INFO] [stdout] | [INFO] [stdout] 270 | assert!((*wake2.awake.lock().unwrap()) == true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*wake2.awake.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/scheduler/try_sync_error.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | impl Into for TrySyncError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 12 ~ impl From for ErrorKind { [INFO] [stdout] 13 ~ fn from(val: TrySyncError) -> Self { [INFO] [stdout] 14 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/desync.rs:76:43 [INFO] [stdout] | [INFO] [stdout] 76 | where TFn: 'static+Send+FnOnce(&mut T) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/desync.rs:89:43 [INFO] [stdout] | [INFO] [stdout] 89 | where TFn: 'static+Send+FnOnce(&mut T) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/desync.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 106 | / let result = { [INFO] [stdout] 107 | | // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 108 | | // Exclusivity is guaranteed because the queue executes only one task at a time [INFO] [stdout] 109 | | let data = DataRef::(self.data); [INFO] [stdout] ... | [INFO] [stdout] 114 | | }) [INFO] [stdout] 115 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 116 | [INFO] [stdout] 117 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 106 ~ [INFO] [stdout] 107 | [INFO] [stdout] 108 ~ { [INFO] [stdout] 109 + // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 110 + // Exclusivity is guaranteed because the queue executes only one task at a time [INFO] [stdout] 111 + let data = DataRef::(self.data); [INFO] [stdout] 112 + [INFO] [stdout] 113 + sync(&self.queue, move || { [INFO] [stdout] 114 + let data = data.0; [INFO] [stdout] 115 + job(unsafe { &mut *data }) [INFO] [stdout] 116 + }) [INFO] [stdout] 117 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/desync.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 125 | / let result = { [INFO] [stdout] 126 | | // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 127 | | let data = DataRef::(self.data); [INFO] [stdout] ... | [INFO] [stdout] 132 | | }) [INFO] [stdout] 133 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 134 | [INFO] [stdout] 135 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 125 ~ [INFO] [stdout] 126 | [INFO] [stdout] 127 ~ { [INFO] [stdout] 128 + // As drop() is the last thing called, we know that this object will still exist at the point where the callback occurs [INFO] [stdout] 129 + let data = DataRef::(self.data); [INFO] [stdout] 130 + [INFO] [stdout] 131 + try_sync(&self.queue, move || { [INFO] [stdout] 132 + let data = data.0; [INFO] [stdout] 133 + job(unsafe { &mut *data }) [INFO] [stdout] 134 + }) [INFO] [stdout] 135 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this async expression only awaits a single future [INFO] [stdout] --> src/desync.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | / async { [INFO] [stdout] 188 | | job.await [INFO] [stdout] 189 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `job` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block [INFO] [stdout] = note: `#[warn(clippy::redundant_async_block)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this async expression only awaits a single future [INFO] [stdout] --> src/desync.rs:224:13 [INFO] [stdout] | [INFO] [stdout] 224 | / async { [INFO] [stdout] 225 | | job.await [INFO] [stdout] 226 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `job` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/pipe.rs:219:46 [INFO] [stdout] | [INFO] [stdout] 219 | let process_future = (&mut *process.lock().unwrap())(core, next); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*process.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pipe.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | return false; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 383 - return false; [INFO] [stdout] 383 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:328:21 [INFO] [stdout] | [INFO] [stdout] 328 | notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 328 - notify.map(|notify| notify.wake()); [INFO] [stdout] 328 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:359:29 [INFO] [stdout] | [INFO] [stdout] 359 | ... notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 359 - notify.map(|notify| notify.wake()); [INFO] [stdout] 359 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/pipe.rs:367:45 [INFO] [stdout] | [INFO] [stdout] 367 | ... let next_item = (&mut *process.lock().unwrap())(core, next); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*process.lock().unwrap())` [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: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:377:29 [INFO] [stdout] | [INFO] [stdout] 377 | ... notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 377 - notify.map(|notify| notify.wake()); [INFO] [stdout] 377 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pipe.rs:428:46 [INFO] [stdout] | [INFO] [stdout] 428 | on_drop: Option ()>> [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/pipe.rs:435:47 [INFO] [stdout] | [INFO] [stdout] 435 | fn new ()>(on_drop: FnOnDrop) -> PipeStream { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:471:9 [INFO] [stdout] | [INFO] [stdout] 471 | core.notify_stream_closed.take().map(|notify_stream_closed| notify_stream_closed.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 471 - core.notify_stream_closed.take().map(|notify_stream_closed| notify_stream_closed.wake()); [INFO] [stdout] 471 + if let Some(notify_stream_closed) = core.notify_stream_closed.take() { notify_stream_closed.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:474:9 [INFO] [stdout] | [INFO] [stdout] 474 | / self.on_drop.take().map(|mut on_drop| { [INFO] [stdout] 475 | | REFERENCE_CHUTE.desync(move |_| { [INFO] [stdout] 476 | | (on_drop)() [INFO] [stdout] 477 | | }) [INFO] [stdout] 478 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 474 ~ if let Some(mut on_drop) = self.on_drop.take() { REFERENCE_CHUTE.desync(move |_| { [INFO] [stdout] 475 + (on_drop)() [INFO] [stdout] 476 + }) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> tests/scheduler/future_sync.rs:361:13 [INFO] [stdout] | [INFO] [stdout] 361 | assert!((*wake2.awake.lock().unwrap()) == false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(*wake2.awake.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> tests/scheduler/future_sync.rs:362:13 [INFO] [stdout] | [INFO] [stdout] 362 | assert!((*wake1.awake.lock().unwrap()) == true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*wake1.awake.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pipe.rs:508:9 [INFO] [stdout] | [INFO] [stdout] 508 | notify.map(|notify| notify.wake()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 508 - notify.map(|notify| notify.wake()); [INFO] [stdout] 508 + if let Some(notify) = notify { notify.wake() } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> tests/scheduler/future_sync.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | assert!((*wake2.awake.lock().unwrap()) == true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*wake2.awake.lock().unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ready()` [INFO] [stdout] --> tests/scheduler/future_sync.rs:393:16 [INFO] [stdout] | [INFO] [stdout] 393 | if let Poll::Ready(_) = &poll_result { break poll_result; } [INFO] [stdout] | -------^^^^^^^^^^^^^^--------------- help: try: `if poll_result.is_ready()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> tests/desync.rs:249:5 [INFO] [stdout] | [INFO] [stdout] 249 | / let _ = sync_request.future_desync(move |data| { [INFO] [stdout] 250 | | async move { [INFO] [stdout] 251 | | let result = core.future_desync(move |_core| { [INFO] [stdout] 252 | | async move { [INFO] [stdout] ... | [INFO] [stdout] 258 | | }.boxed() [INFO] [stdout] 259 | | }); [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.03s [INFO] running `Command { std: "docker" "inspect" "e5fddae472e4f02cb83d12d3df4d971681fcdd16bf006c316c52e50c88100b2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e5fddae472e4f02cb83d12d3df4d971681fcdd16bf006c316c52e50c88100b2d", kill_on_drop: false }` [INFO] [stdout] e5fddae472e4f02cb83d12d3df4d971681fcdd16bf006c316c52e50c88100b2d