1
- //! Exports item [`Multiboot2InformationBuilder `].
1
+ //! Exports item [`InformationBuilder `].
2
2
use crate :: builder:: traits:: StructAsBytes ;
3
3
use crate :: {
4
4
BasicMemoryInfoTag , BootInformationInner , BootLoaderNameTag , CommandLineTag ,
@@ -16,7 +16,7 @@ use core::mem::size_of;
16
16
/// except for the END tag.
17
17
#[ derive( Debug ) ]
18
18
// #[derive(Debug, PartialEq, Eq)] // wait for uefi-raw 0.3.0
19
- pub struct Multiboot2InformationBuilder {
19
+ pub struct InformationBuilder {
20
20
basic_memory_info_tag : Option < BasicMemoryInfoTag > ,
21
21
boot_loader_name_tag : Option < Box < BootLoaderNameTag > > ,
22
22
command_line_tag : Option < Box < CommandLineTag > > ,
@@ -36,7 +36,7 @@ pub struct Multiboot2InformationBuilder {
36
36
smbios_tags : Vec < Box < SmbiosTag > > ,
37
37
}
38
38
39
- impl Multiboot2InformationBuilder {
39
+ impl InformationBuilder {
40
40
pub const fn new ( ) -> Self {
41
41
Self {
42
42
basic_memory_info_tag : None ,
@@ -289,20 +289,20 @@ impl Multiboot2InformationBuilder {
289
289
290
290
#[ cfg( test) ]
291
291
mod tests {
292
- use crate :: builder:: information:: Multiboot2InformationBuilder ;
292
+ use crate :: builder:: information:: InformationBuilder ;
293
293
use crate :: { load, BasicMemoryInfoTag , CommandLineTag , ModuleTag } ;
294
294
295
295
#[ test]
296
296
fn test_size_or_up_aligned ( ) {
297
- assert_eq ! ( 0 , Multiboot2InformationBuilder :: size_or_up_aligned( 0 ) ) ;
298
- assert_eq ! ( 8 , Multiboot2InformationBuilder :: size_or_up_aligned( 1 ) ) ;
299
- assert_eq ! ( 8 , Multiboot2InformationBuilder :: size_or_up_aligned( 8 ) ) ;
300
- assert_eq ! ( 16 , Multiboot2InformationBuilder :: size_or_up_aligned( 9 ) ) ;
297
+ assert_eq ! ( 0 , InformationBuilder :: size_or_up_aligned( 0 ) ) ;
298
+ assert_eq ! ( 8 , InformationBuilder :: size_or_up_aligned( 1 ) ) ;
299
+ assert_eq ! ( 8 , InformationBuilder :: size_or_up_aligned( 8 ) ) ;
300
+ assert_eq ! ( 16 , InformationBuilder :: size_or_up_aligned( 9 ) ) ;
301
301
}
302
302
303
303
#[ test]
304
304
fn test_builder ( ) {
305
- let mut builder = Multiboot2InformationBuilder :: new ( ) ;
305
+ let mut builder = InformationBuilder :: new ( ) ;
306
306
// Multiboot2 basic information + end tag
307
307
let mut expected_len = 8 + 8 ;
308
308
assert_eq ! ( builder. expected_len( ) , expected_len) ;
0 commit comments