summary refs log tree commit diff stats
path: root/rust/hw/timer
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2025-04-14 22:49:43 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2025-04-23 10:35:23 +0200
commitad3ab01bb7380f8cc8cf86dd260ce751148d6d21 (patch)
treefc24c9d58eb9f1920015f7f347889ed2d5722094 /rust/hw/timer
parent64e1256b21395eb7c8a9419faba4187dea73970d (diff)
downloadfocaccia-qemu-ad3ab01bb7380f8cc8cf86dd260ce751148d6d21.tar.gz
focaccia-qemu-ad3ab01bb7380f8cc8cf86dd260ce751148d6d21.zip
rust/hpet: Fix a clippy error
Carge clippy complained about:

error: casts from `u8` to `u32` can be expressed infallibly using `From`

So use `From` to convert `u8` to `u32`.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250414144943.1112885-10-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/timer')
-rw-r--r--rust/hw/timer/hpet/src/hpet.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/hw/timer/hpet/src/hpet.rs b/rust/hw/timer/hpet/src/hpet.rs
index dc8a23f29d..cbd2ed4f6b 100644
--- a/rust/hw/timer/hpet/src/hpet.rs
+++ b/rust/hw/timer/hpet/src/hpet.rs
@@ -353,7 +353,7 @@ impl HPETTimer {
         // still operate and generate appropriate status bits, but
         // will not cause an interrupt"
         self.get_state()
-            .update_int_status(self.index as u32, set && self.is_int_level_triggered());
+            .update_int_status(self.index.into(), set && self.is_int_level_triggered());
         self.set_irq(set);
     }