From ab731679ef586727932f7cbb075681fdf2fc1453 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Sun, 29 Dec 2019 23:40:11 +0200 Subject: [PATCH] core: gba: Get rid of usesless RcRefcells in main object Former-commit-id: 55beb34c529a8c8f19d0dffcef33584fb4c97e7a --- src/core/gba.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/gba.rs b/src/core/gba.rs index 489399e..502b672 100644 --- a/src/core/gba.rs +++ b/src/core/gba.rs @@ -15,8 +15,6 @@ use super::super::{AudioInterface, InputInterface, VideoInterface}; pub struct GameBoyAdvance { pub sysbus: Box, pub cpu: Core, - video_device: Rc>, - audio_device: Rc>, input_device: Rc>, } @@ -29,14 +27,12 @@ impl GameBoyAdvance { audio_device: Rc>, input_device: Rc>, ) -> GameBoyAdvance { - let gpu = Box::new(Gpu::new(video_device.clone())); - let sound_controller = Box::new(SoundController::new(audio_device.clone())); + let gpu = Box::new(Gpu::new(video_device)); + let sound_controller = Box::new(SoundController::new(audio_device)); let io = IoDevices::new(gpu, sound_controller); GameBoyAdvance { cpu: cpu, sysbus: Box::new(SysBus::new(io, bios_rom, gamepak)), - video_device: video_device, - audio_device: audio_device, input_device: input_device, } }