File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
- use core:: { ops:: Deref , ptr:: NonNull } ;
1
+ use core:: { fmt , ops:: Deref , ptr:: NonNull } ;
2
2
3
3
/// Describes a physical mapping created by `AcpiHandler::map_physical_region` and unmapped by
4
4
/// `AcpiHandler::unmap_physical_region`. The region mapped must be at least `size_of::<T>()`
5
5
/// bytes, but may be bigger.
6
6
///
7
7
/// See `PhysicalMapping::new` for the meaning of each field.
8
- #[ derive( Debug ) ]
9
8
pub struct PhysicalMapping < H , T >
10
9
where
11
10
H : AcpiHandler ,
17
16
handler : H ,
18
17
}
19
18
19
+ impl < H , T > fmt:: Debug for PhysicalMapping < H , T >
20
+ where
21
+ H : AcpiHandler + fmt:: Debug ,
22
+ {
23
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
24
+ f. debug_struct ( "PhysicalMapping" )
25
+ . field ( "physical_start" , & self . physical_start )
26
+ . field ( "virtual_start" , & self . virtual_start )
27
+ . field ( "region_length" , & self . region_length )
28
+ . field ( "mapped_length" , & self . mapped_length )
29
+ . field ( "handler" , & self . handler )
30
+ . finish ( )
31
+ }
32
+ }
33
+
20
34
impl < H , T > PhysicalMapping < H , T >
21
35
where
22
36
H : AcpiHandler ,
You can’t perform that action at this time.
0 commit comments