Closed robo9k closed 9 years ago
Sorry about the delayed review. This is really nice and much more readable (not to mention safer), :grinning: thanks!! I'm not too worried about using things marked with trait is likely to be removed
at this point, as I'm sure we can find replacements once things start to settle.
As commented in #19, this replaces the
u8
ofVx
/Vy
with anenum Register
, so they can only take valid values as well as providing names for the registers themselves.The implementation is debatable, as it uses unstable traits. I also made an alternative implementation writing manual
Register::from_idx()
andRegister::idx()
functions, which is slightly more verbose.