cros_async, hypervisor: remove unnecessary unit-valued lets

The functions being called do not have return values (they return the
unit value), so the `let _ =` does nothing and can be removed.

Fixes a new clippy lint:
<https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value>

BUG=b:243677117
TEST=tools/clippy # with Rust 1.62

Change-Id: I6003b162c36e7be1ee71e3edc4e304c86fdc5676
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3854970
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2022-08-23 16:37:43 -07:00 committed by crosvm LUCI
parent b74d8df552
commit 8dc63758e2
4 changed files with 5 additions and 5 deletions

View file

@ -392,7 +392,7 @@ mod test {
let unfinished = pool.spawn(|| 5, || 0);
// Disarming should cancel the task.
let _ = pool.disarm();
pool.disarm();
// Shutdown the blocking thread. This will allow a worker to pick up the task that has
// to be cancelled.
@ -403,7 +403,7 @@ mod test {
assert_eq!(block_on(unfinished), 0);
// Now the pool is empty and can be shutdown without blocking.
let _ = pool.shutdown().unwrap();
pool.shutdown().unwrap();
}
#[test]

View file

@ -262,7 +262,7 @@ impl RegisteredSource {
impl Drop for RegisteredSource {
fn drop(&mut self) {
if let Some(ex) = self.ex.upgrade() {
let _ = ex.deregister_source(self);
ex.deregister_source(self);
}
}
}

View file

@ -1251,7 +1251,7 @@ impl BlockedSignal {
impl Drop for BlockedSignal {
fn drop(&mut self) {
let _ = unblock_signal(self.signal_num).expect("failed to restore signal mask");
unblock_signal(self.signal_num).expect("failed to restore signal mask");
}
}

View file

@ -1757,7 +1757,7 @@ impl BlockedSignal {
impl Drop for BlockedSignal {
fn drop(&mut self) {
let _ = unblock_signal(self.signal_num).expect("failed to restore signal mask");
unblock_signal(self.signal_num).expect("failed to restore signal mask");
}
}