[brw] Remove clone and satisfy the borrow checker

This commit is contained in:
2024-02-18 19:45:34 +05:30
parent ba1c1a1412
commit f6eca76b0c
9 changed files with 87 additions and 76 deletions

View File

@@ -8,12 +8,12 @@ pub enum CpuState{
}
#[derive(Debug)]
pub struct Cpu{
mapped_memory: MappedMemory,
pub struct Cpu<'a>{
mapped_memory:&'a mut MappedMemory<'a>,
}
impl Cpu{
pub fn new(mapped_memory: MappedMemory)->Cpu{
impl <'a> Cpu<'a>{
pub fn new(mapped_memory: &'a mut MappedMemory<'a>)->Cpu<'a>{
Cpu{
mapped_memory
}