Skip to content

Commit

Permalink
remove unnecassary retain
Browse files Browse the repository at this point in the history
  • Loading branch information
lenawanel committed May 29, 2024
1 parent f55eb5b commit e7db0c4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,6 @@ impl Cpu {
self.write(addr, self.xregs.read(rs2), WORD)?;
self.xregs.write(rd, 0);
} else {
self.reservation_set.retain(|&x| x != addr);
self.xregs.write(rd, 1);
};
}
Expand All @@ -1811,7 +1810,6 @@ impl Cpu {
self.write(addr, self.xregs.read(rs2), DOUBLEWORD)?;
self.xregs.write(rd, 0);
} else {
self.reservation_set.retain(|&x| x != addr);
self.xregs.write(rd, 1);
}
}
Expand Down

0 comments on commit e7db0c4

Please sign in to comment.