Skip to content

Commit

Permalink
Adopted to purely namespaced enums (rust-lang/rust#18973)
Browse files Browse the repository at this point in the history
  • Loading branch information
reima committed Nov 18, 2014
1 parent 1ea8efb commit 68323cf
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 259 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/cartridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Cartridge {
let mbc =
match cartridge_type {
0x00 => None,
0x01 => Some(MBC1),
0x01 => Some(MBC::MBC1),
_ => panic!("unsupported cartridge type: 0x{:02X}", cartridge_type)
};

Expand Down Expand Up @@ -92,7 +92,7 @@ impl Mem for Cartridge {
fn storeb(&mut self, addr: u16, val: u8) {
match self.mbc {
None => info!("store 0x{:02X} in cartridge ROM at ${:04X}", val, addr),
Some(MBC1) => {
Some(MBC::MBC1) => {
match addr {
0x0000...0x1fff => debug!("RAM enable"),
0x2000...0x3fff => { // set lower 5 bits of ROM bank
Expand Down
Loading

0 comments on commit 68323cf

Please sign in to comment.