From 1bc9db2e8de21995fef2a4f59d8e1d20eef7d470 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 27 Aug 2026 07:01:19 +0200 Subject: Implement the Default trait for MemoryInitialValue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- lib/vnf/src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/vnf/src') diff --git a/lib/vnf/src/lib.rs b/lib/vnf/src/lib.rs index f2524cd..b1b596b 100644 --- a/lib/vnf/src/lib.rs +++ b/lib/vnf/src/lib.rs @@ -143,6 +143,17 @@ pub struct MemoryPolicy { pub minimum_stack_value: u8, } +impl Default for MemoryPolicy { + fn default() -> Self { + Self { + initial_value: MemoryInitialValue::Fixed(0), + allowed_reads: vec![(0..0x800)], + allowed_writes: vec![(0..0x800)], + minimum_stack_value: 0, + } + } +} + /// The state of the Joypad handshake process. #[derive(Copy, Clone, Debug, Default)] pub enum JoypadState { -- cgit v1.2.3