mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Fix clippy issue related to unnecessary closure
error: unnecessary closure used with `bool::then`
--> cloud-hypervisor/tests/integration.rs:3488:9
|
3488 | output.status.success().then(|| ())?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::unnecessary_lazy_evaluations)]`
help: use `then_some` instead
|
3488 - output.status.success().then(|| ())?;
3488 + output.status.success().then_some(())?;
|
Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -3485,7 +3485,7 @@ mod common_parallel {
|
||||
fn get_image_info(path: &std::path::Path) -> Option<serde_json::Value> {
|
||||
let output = run_qemu_img(path, &["info", "-U", "--output=json"], None);
|
||||
|
||||
output.status.success().then(|| ())?;
|
||||
output.status.success().then_some(())?;
|
||||
serde_json::from_slice(&output.stdout).ok()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user