@@ -31,13 +31,12 @@ pub use elf_sections::{
3131pub use framebuffer:: { FramebufferColor , FramebufferField , FramebufferTag , FramebufferType } ;
3232use header:: { Tag , TagIter } ;
3333pub use memory_map:: {
34- EFIMemoryAreaType , EFIMemoryMapTag , EFIMemoryDesc , MemoryArea , MemoryAreaIter ,
35- MemoryAreaType , MemoryMapTag ,
34+ EFIMemoryAreaType , EFIMemoryDesc , EFIMemoryMapTag , MemoryArea , MemoryAreaIter , MemoryAreaType ,
35+ MemoryMapTag ,
3636} ;
3737pub use module:: { ModuleIter , ModuleTag } ;
3838pub use rsdp:: {
39- EFIImageHandle32 , EFIImageHandle64 , EFISdt32 , EFISdt64 , ImageLoadPhysAddr ,
40- RsdpV1Tag , RsdpV2Tag ,
39+ EFIImageHandle32 , EFIImageHandle64 , EFISdt32 , EFISdt64 , ImageLoadPhysAddr , RsdpV1Tag , RsdpV2Tag ,
4140} ;
4241pub use vbe_info:: {
4342 VBECapabilities , VBEControlInfo , VBEDirectColorAttributes , VBEField , VBEInfoTag ,
@@ -156,7 +155,7 @@ impl BootInformation {
156155 }
157156
158157 /// Get an iterator of all module tags.
159- pub fn module_tags ( & self ) -> ModuleIter {
158+ pub fn module_tags ( & self ) -> impl Iterator < Item = & ModuleTag > {
160159 module:: module_iter ( self . tags ( ) )
161160 }
162161
@@ -207,10 +206,9 @@ impl BootInformation {
207206 // the memory map, as it could still be in use.
208207 match self . get_tag ( 18 ) {
209208 Some ( _tag) => None ,
210- None => {
211- self . get_tag ( 17 )
212- . map ( |tag| unsafe { & * ( tag as * const Tag as * const EFIMemoryMapTag ) } )
213- } ,
209+ None => self
210+ . get_tag ( 17 )
211+ . map ( |tag| unsafe { & * ( tag as * const Tag as * const EFIMemoryMapTag ) } ) ,
214212 }
215213 }
216214
@@ -1279,9 +1277,9 @@ mod tests {
12791277 1 , 0 , 0 , 0 , // EFI descriptor version, don't think this matters.
12801278 7 , 0 , 0 , 0 , // Type: EfiConventionalMemory
12811279 0 , 0 , 0 , 0 , // Padding
1282- 0 , 0 , 16 , 0 , // Physical Address: should be 0x100000
1280+ 0 , 0 , 16 , 0 , // Physical Address: should be 0x100000
12831281 0 , 0 , 0 , 0 , // Extension of physical address.
1284- 0 , 0 , 16 , 0 , // Virtual Address: should be 0x100000
1282+ 0 , 0 , 16 , 0 , // Virtual Address: should be 0x100000
12851283 0 , 0 , 0 , 0 , // Extension of virtual address.
12861284 4 , 0 , 0 , 0 , // 4 KiB Pages: 16 KiB
12871285 0 , 0 , 0 , 0 , // Extension of pages
@@ -1313,9 +1311,9 @@ mod tests {
13131311 1 , 0 , 0 , 0 , // EFI descriptor version, don't think this matters.
13141312 7 , 0 , 0 , 0 , // Type: EfiConventionalMemory
13151313 0 , 0 , 0 , 0 , // Padding
1316- 0 , 0 , 16 , 0 , // Physical Address: should be 0x100000
1314+ 0 , 0 , 16 , 0 , // Physical Address: should be 0x100000
13171315 0 , 0 , 0 , 0 , // Extension of physical address.
1318- 0 , 0 , 16 , 0 , // Virtual Address: should be 0x100000
1316+ 0 , 0 , 16 , 0 , // Virtual Address: should be 0x100000
13191317 0 , 0 , 0 , 0 , // Extension of virtual address.
13201318 4 , 0 , 0 , 0 , // 4 KiB Pages: 16 KiB
13211319 0 , 0 , 0 , 0 , // Extension of pages
@@ -1340,5 +1338,4 @@ mod tests {
13401338 core:: mem:: transmute :: < [ u8 ; 56 ] , EFIMemoryMapTag > ( [ 0u8 ; 56 ] ) ;
13411339 }
13421340 }
1343-
13441341}
0 commit comments