diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-08-27 07:01:19 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-08-27 07:09:07 +0200 |
| commit | 1bc9db2e8de21995fef2a4f59d8e1d20eef7d470 (patch) | |
| tree | cb6948f298d9d835a0e5ee043e599134c3d4b9f0 /lib | |
| parent | 8736745acd3594d1f6200cbfb56fee5f4b17885f (diff) | |
| download | tools.nes-1bc9db2e8de21995fef2a4f59d8e1d20eef7d470.tar.gz tools.nes-1bc9db2e8de21995fef2a4f59d8e1d20eef7d470.zip | |
Implement the Default trait for MemoryInitialValue
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/vnf/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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 { |
