Skip to content

Commit d25a11c

Browse files
committed
fix(vm): remove duplicate code lines
1 parent 7b1c571 commit d25a11c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/vm.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,13 @@ impl<H: AxVMHal, U: AxVCpuHal> AxVM<H, U> {
514514
reg_width: _,
515515
signed_ext: _,
516516
} => {
517-
let val = self.get_devices().handle_mmio_read(*addr, *width)?;
518517
let val = self.get_devices().handle_mmio_read(*addr, *width)?;
519518
vcpu.set_gpr(*reg, val);
520519
true
521520
}
522521
AxVCpuExitReason::MmioWrite { addr, width, data } => {
523522
self.get_devices()
524523
.handle_mmio_write(*addr, *width, *data as usize)?;
525-
.handle_mmio_write(*addr, *width, *data as usize)?;
526524
true
527525
}
528526
AxVCpuExitReason::IoRead { port, width } => {
@@ -696,7 +694,6 @@ impl<H: AxVMHal, U: AxVCpuHal> AxVM<H, U> {
696694
)
697695
};
698696
let mut copied_bytes = 0;
699-
for chunk in buffer.iter_mut() {
700697
for chunk in buffer.iter_mut() {
701698
let end = copied_bytes + chunk.len();
702699
chunk.copy_from_slice(&bytes[copied_bytes..end]);

0 commit comments

Comments
 (0)