r68k icon indicating copy to clipboard operation
r68k copied to clipboard

Use default for Cpu struct

Open emoon opened this issue 8 years ago • 0 comments

Here

https://github.com/marhel/r68k/blob/master/src/cpu/mod.rs#L11

It's possible to use #[derive(Default)]

And then it's possible to call

Rust Cpu::default()


To get all default values. Also when setting up a struct one can do this

``` Rust
Cpu {
   some_field: true,
   some_other_field: Foo,
   .. Cpu::default(), // Rest should use default settings.
}

emoon avatar Feb 04 '16 08:02 emoon