mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
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>
(cherry picked from commit 6b3fad084f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
committed by
Michael Tokarev
parent
6cd9548f1f
commit
2fbab04cbd
@@ -765,7 +765,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user