diff --git a/src/cpu.rs b/src/cpu.rs index ec512278b1ecd174854497e09743523db7293841..fad2c3569dd2f7d2110743b08f74c8fcce0da9cf 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -582,7 +582,7 @@ impl Cpu { impl Default for Cpu { fn default() -> Self { let gbc: Rc<RefCell<GameBoyConfig>> = Rc::new(RefCell::new(GameBoyConfig::default())); - Cpu::new(Mmu::default(), gbc.clone()) + Cpu::new(Mmu::default(), gbc) } } diff --git a/src/dma.rs b/src/dma.rs index 13e243f191448698f309d6f72bca872819551c4f..9e048b5996b9390d2eeabfe220bd62936c5a44e9 100644 --- a/src/dma.rs +++ b/src/dma.rs @@ -124,7 +124,7 @@ mod tests { #[test] fn test_dma_default() { let dma = Dma::default(); - assert_eq!(dma.active, false); + assert!(!dma.active); } #[test] @@ -142,13 +142,13 @@ mod tests { assert_eq!(dma.destination, 0x0); assert_eq!(dma.length, 0x0); assert_eq!(dma.mode, DmaMode::General); - assert_eq!(dma.active, false); + assert!(!dma.active); } #[test] fn test_dma_set_active() { let mut dma = Dma::new(); dma.set_active(true); - assert_eq!(dma.active, true); + assert!(dma.active); } } diff --git a/src/mmu.rs b/src/mmu.rs index bdcecbf6c6f2ab35b17d578d52f0814b30dba95b..a32bbe8b82c1c5c6d1b62b57a4247896bbfb477d 100644 --- a/src/mmu.rs +++ b/src/mmu.rs @@ -538,6 +538,6 @@ impl Default for Mmu { timer: Timer::default(), serial: Serial::default(), }; - Mmu::new(components, mode, gbc.clone()) + Mmu::new(components, mode, gbc) } }