File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2577,6 +2577,13 @@ impl<T> MapCell<T> {
25772577 loop { }
25782578 }
25792579}
2580+
2581+ fn mapcell_map < T , F , R > ( closure : F ) -> Option < R > where F : FnOnce ( & mut T ) -> R
2582+ {
2583+ closure ( None :: < & mut T > . unwrap ( ) ) ;
2584+ loop { }
2585+ }
2586+
25802587use crate :: common:: { Queue , RingBuffer } ;
25812588use crate :: mem:: { AppSlice , Shared } ;
25822589use crate :: platform:: mpu:: { self , MPU } ;
@@ -2719,7 +2726,7 @@ pub struct Process<'a, C: 'static + Chip> {
27192726
27202727impl < C : Chip > ProcessType for Process < ' a , C > {
27212728 unsafe fn process_detail_fmt ( & self , writer : & mut dyn Write ) {
2722- self . mpu_config . map ( |config| {
2729+ mapcell_map ( |config : & mut << C as Chip > :: MPU as MPU > :: MpuConfig | {
27232730 let _ = writer. write_fmt ( format_args ! ( "{}" , config) ) ;
27242731 } ) ;
27252732 }
You can’t perform that action at this time.
0 commit comments