From e05059a8c29ee84654c9de0406cb930beb1eedae Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Mon, 7 Oct 2024 14:08:12 -0400 Subject: [PATCH] kernel: process std: simplify debug default Only need the custom default for the map cell, not the inner type. --- kernel/src/process_standard.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/kernel/src/process_standard.rs b/kernel/src/process_standard.rs index 67afcf743d..666016d954 100644 --- a/kernel/src/process_standard.rs +++ b/kernel/src/process_standard.rs @@ -142,6 +142,7 @@ pub struct ProcessStandardDebugFull { /// /// These pointers and counters are not strictly required for kernel operation, /// but provide helpful information when an app crashes. +#[derive(Default)] struct ProcessStandardDebugFullInner { /// If this process was compiled for fixed addresses, save the address /// it must be at in flash. This is useful for debugging and saves having @@ -268,17 +269,7 @@ impl ProcessStandardDebug for ProcessStandardDebugFull { impl Default for ProcessStandardDebugFull { fn default() -> Self { Self { - debug: MapCell::new(ProcessStandardDebugFullInner { - fixed_address_flash: None, - fixed_address_ram: None, - app_heap_start_pointer: None, - app_stack_start_pointer: None, - app_stack_min_pointer: None, - syscall_count: 0, - last_syscall: None, - dropped_upcall_count: 0, - timeslice_expiration_count: 0, - }), + debug: MapCell::new(ProcessStandardDebugFullInner::default()), } } }