Skip to content

Commit 65d9dcb

Browse files
committed
Drop the reference to the entry earlier
1 parent 1d22934 commit 65d9dcb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

towboot/src/boot/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,13 @@ fn prepare_multiboot_information(
292292
/// a kernel, information and modules.
293293
///
294294
/// This is the main struct in this module.
295-
pub struct PreparedEntry<'a> {
296-
entry: &'a Entry,
295+
pub struct PreparedEntry {
297296
loaded_kernel: LoadedKernel,
298297
multiboot_information: InfoBuilder,
299298
modules_vec: Vec<Allocation>,
300299
}
301300

302-
impl<'a> PreparedEntry<'a> {
301+
impl PreparedEntry {
303302
/// Prepare an entry for boot.
304303
///
305304
/// What this means:
@@ -313,7 +312,7 @@ impl<'a> PreparedEntry<'a> {
313312
/// The returned `PreparedEntry` can be used to actually boot.
314313
/// This is non-destructive and will always return.
315314
pub(crate) fn new(
316-
entry: &'a Entry, image_fs_handle: Handle,
315+
entry: &Entry, image_fs_handle: Handle,
317316
) -> Result<Self, Status> {
318317
let kernel_vec: Vec<u8> = File::open(&entry.image, image_fs_handle)?.try_into()?;
319318
let header = Header::from_slice(kernel_vec.as_slice()).ok_or_else(|| {
@@ -345,7 +344,7 @@ impl<'a> PreparedEntry<'a> {
345344
);
346345

347346
Ok(PreparedEntry {
348-
entry, loaded_kernel, multiboot_information, modules_vec,
347+
loaded_kernel, multiboot_information, modules_vec,
349348
})
350349
}
351350

0 commit comments

Comments
 (0)