Skip to content

Commit 7587638

Browse files
committed
Run cargo fmt
1 parent 538570e commit 7587638

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ An experimental x86_64 bootloader that works on both BIOS and UEFI systems.
77
use anyhow::Context;
88
use std::{
99
collections::BTreeMap,
10-
path::{Path, PathBuf, self}, ops::Deref,
10+
ops::Deref,
11+
path::{self, Path, PathBuf},
1112
};
1213
use tempfile::NamedTempFile;
1314

@@ -143,10 +144,8 @@ impl UefiBoot {
143144
Ok(())
144145
}
145146

146-
147147
/// Creates an UEFI-bootable FAT partition with the kernel.
148148
fn create_fat_partition(&self) -> anyhow::Result<NamedTempFile> {
149-
150149
let bootloader_path = Path::new(env!("UEFI_BOOTLOADER_PATH"));
151150
let has_rd_path = self.ramdisk.is_some();
152151
let binding = self.ramdisk.as_deref();
@@ -155,11 +154,11 @@ impl UefiBoot {
155154
let mut files = BTreeMap::new();
156155
files.insert("efi/boot/bootx64.efi", bootloader_path);
157156
files.insert(KERNEL_FILE_NAME, kernel_path);
158-
157+
159158
if has_rd_path {
160159
files.insert(RAMDISK_FILE_NAME, ramdisk_path);
161160
}
162-
161+
163162
let out_file = NamedTempFile::new().context("failed to create temp file")?;
164163
fat::create_fat_filesystem(files, out_file.path())
165164
.context("failed to create UEFI FAT filesystem")?;

0 commit comments

Comments
 (0)