Skip to content

Commit ae49051

Browse files
committed
multiboot2: Get a mutable reference to the basic memory information tag
1 parent 6195a42 commit ae49051

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

multiboot2/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,13 @@ impl<'a> BootInformation<'a> {
284284
self.get_tag::<BasicMemoryInfoTag, _>(TagType::BasicMeminfo)
285285
}
286286

287+
/// Search for the basic memory info tag, return a mutable reference.
288+
pub fn basic_memory_info_tag_mut<'b: 'a>(&'b mut self) -> Option<&'b mut BasicMemoryInfoTag> {
289+
self.get_tag_mut::<BasicMemoryInfoTag, _>(TagType::BasicMeminfo)
290+
}
291+
287292
/// Returns an [`ElfSectionIter`] iterator over the ELF Sections, if the
288293
/// [`ElfSectionsTag`] is present.
289-
///
290294
/// # Examples
291295
///
292296
/// ```rust,no_run

0 commit comments

Comments
 (0)