Skip to content

Commit

Permalink
cargo clippy --workspace...
Browse files Browse the repository at this point in the history
  • Loading branch information
iximeow committed Sep 25, 2024
1 parent ab9743e commit 458b740
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions phd-tests/framework/src/test_vm/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ impl<'dr> VmConfig<'dr> {
let boot_disk =
self.disks.iter().find(|d| d.name == "boot-disk")
.or_else(|| if let Some(boot_order) = self.boot_order.as_ref() {
boot_order.get(0).and_then(|name| self.disks.iter().find(|d| &d.name == name))
boot_order.first().and_then(|name| self.disks.iter().find(|d| &d.name == name))
} else {
None
})
.or_else(|| self.disks.get(0))
.or_else(|| self.disks.first())
.expect("VM config includes at least one disk (and maybe a boot order)?");

// XXX: assuming all bootable images are equivalent to the first, or at least the same
Expand Down
2 changes: 1 addition & 1 deletion phd-tests/tests/src/boot_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ async fn guest_can_adjust_boot_order(ctx: &Framework) {
// will not let us perform a useful test.
write_efivar(&vm, &bootvar(0xfff0), &boot_option_bytes).await?;
let reread = read_efivar(&vm, &bootvar(0xfff0)).await?;
if reread.len() == 0 {
if reread.is_empty() {
warn!(
"guest environment drops EFI variable writes! \
exiting test WITHOUT VALIDATING ANYTHING"
Expand Down

0 comments on commit 458b740

Please sign in to comment.