diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-16 18:56:49 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-20 13:25:59 +0200 |
commit | 6b3fad084fc4e13901e252fe6c2a2c46ecea999b (patch) | |
tree | faac27b6cf30bbfa2456fc4ec889769e98f15f0c /rust/hw | |
parent | b783601d1a3b3fd468035baf0ce2ead166e0abdc (diff) | |
download | qemu-6b3fad084fc4e13901e252fe6c2a2c46ecea999b.zip qemu-6b3fad084fc4e13901e252fe6c2a2c46ecea999b.tar.gz qemu-6b3fad084fc4e13901e252fe6c2a2c46ecea999b.tar.bz2 |
rust: hpet: fix new warning
Nightly rustc complains that HPETAddrDecode has a lifetime but it is not
clearly noted that it comes from &self. Apply the compiler's suggestion
to shut it up.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw')
-rw-r--r-- | rust/hw/timer/hpet/src/device.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/hw/timer/hpet/src/device.rs b/rust/hw/timer/hpet/src/device.rs index a281927..acf7251 100644 --- a/rust/hw/timer/hpet/src/device.rs +++ b/rust/hw/timer/hpet/src/device.rs @@ -771,7 +771,7 @@ impl HPETState { self.rtc_irq_level.set(0); } - fn decode(&self, mut addr: hwaddr, size: u32) -> HPETAddrDecode { + fn decode(&self, mut addr: hwaddr, size: u32) -> HPETAddrDecode<'_> { let shift = ((addr & 4) * 8) as u32; let len = std::cmp::min(size * 8, 64 - shift); |