@@ -31,13 +31,12 @@ pub use elf_sections::{
31
31
pub use framebuffer:: { FramebufferColor , FramebufferField , FramebufferTag , FramebufferType } ;
32
32
use header:: { Tag , TagIter } ;
33
33
pub use memory_map:: {
34
- EFIMemoryAreaType , EFIMemoryMapTag , EFIMemoryDesc , MemoryArea , MemoryAreaIter ,
35
- MemoryAreaType , MemoryMapTag ,
34
+ EFIMemoryAreaType , EFIMemoryDesc , EFIMemoryMapTag , MemoryArea , MemoryAreaIter , MemoryAreaType ,
35
+ MemoryMapTag ,
36
36
} ;
37
37
pub use module:: { ModuleIter , ModuleTag } ;
38
38
pub use rsdp:: {
39
- EFIImageHandle32 , EFIImageHandle64 , EFISdt32 , EFISdt64 , ImageLoadPhysAddr ,
40
- RsdpV1Tag , RsdpV2Tag ,
39
+ EFIImageHandle32 , EFIImageHandle64 , EFISdt32 , EFISdt64 , ImageLoadPhysAddr , RsdpV1Tag , RsdpV2Tag ,
41
40
} ;
42
41
pub use vbe_info:: {
43
42
VBECapabilities , VBEControlInfo , VBEDirectColorAttributes , VBEField , VBEInfoTag ,
@@ -156,7 +155,7 @@ impl BootInformation {
156
155
}
157
156
158
157
/// Get an iterator of all module tags.
159
- pub fn module_tags ( & self ) -> ModuleIter {
158
+ pub fn module_tags ( & self ) -> impl Iterator < Item = & ModuleTag > {
160
159
module:: module_iter ( self . tags ( ) )
161
160
}
162
161
@@ -207,10 +206,9 @@ impl BootInformation {
207
206
// the memory map, as it could still be in use.
208
207
match self . get_tag ( 18 ) {
209
208
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 ) } ) ,
214
212
}
215
213
}
216
214
@@ -1279,9 +1277,9 @@ mod tests {
1279
1277
1 , 0 , 0 , 0 , // EFI descriptor version, don't think this matters.
1280
1278
7 , 0 , 0 , 0 , // Type: EfiConventionalMemory
1281
1279
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
1283
1281
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
1285
1283
0 , 0 , 0 , 0 , // Extension of virtual address.
1286
1284
4 , 0 , 0 , 0 , // 4 KiB Pages: 16 KiB
1287
1285
0 , 0 , 0 , 0 , // Extension of pages
@@ -1313,9 +1311,9 @@ mod tests {
1313
1311
1 , 0 , 0 , 0 , // EFI descriptor version, don't think this matters.
1314
1312
7 , 0 , 0 , 0 , // Type: EfiConventionalMemory
1315
1313
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
1317
1315
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
1319
1317
0 , 0 , 0 , 0 , // Extension of virtual address.
1320
1318
4 , 0 , 0 , 0 , // 4 KiB Pages: 16 KiB
1321
1319
0 , 0 , 0 , 0 , // Extension of pages
@@ -1340,5 +1338,4 @@ mod tests {
1340
1338
core:: mem:: transmute :: < [ u8 ; 56 ] , EFIMemoryMapTag > ( [ 0u8 ; 56 ] ) ;
1341
1339
}
1342
1340
}
1343
-
1344
1341
}
0 commit comments