summary refs log tree commit diff stats
path: root/rust/hw/core/src/qdev.rs
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2025-09-21 00:05:12 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2025-09-22 17:17:18 +0200
commit35d7735f765adc4cf759b8ad221e8858ca5be9c5 (patch)
tree12e83005b5977a73f1bc698e9ebcc545a5095517 /rust/hw/core/src/qdev.rs
parent1bbac0ca88cdfd6ac019685a855c92831e3862e3 (diff)
downloadfocaccia-qemu-35d7735f765adc4cf759b8ad221e8858ca5be9c5.tar.gz
focaccia-qemu-35d7735f765adc4cf759b8ad221e8858ca5be9c5.zip
rust/common/uninit: Fix Clippy's complaints about lifetime
Clippy complains about the following cases and following its suggestion
to fix these warnings.

warning: the following explicit lifetimes could be elided: 'a
  --> common/src/uninit.rs:38:6
   |
38 | impl<'a, T, U> Deref for MaybeUninitField<'a, T, U> {
   |      ^^                                   ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
38 - impl<'a, T, U> Deref for MaybeUninitField<'a, T, U> {
38 + impl<T, U> Deref for MaybeUninitField<'_, T, U> {
   |

warning: the following explicit lifetimes could be elided: 'a
  --> common/src/uninit.rs:49:6
   |
49 | impl<'a, T, U> DerefMut for MaybeUninitField<'a, T, U> {
   |      ^^                                      ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
49 - impl<'a, T, U> DerefMut for MaybeUninitField<'a, T, U> {
49 + impl<T, U> DerefMut for MaybeUninitField<'_, T, U> {
   |

warning: `common` (lib) generated 2 warnings (run `cargo clippy --fix --lib -p common` to apply 2 suggestions)

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20250920160520.3699591-5-zhao1.liu@intel.com
Diffstat (limited to 'rust/hw/core/src/qdev.rs')
0 files changed, 0 insertions, 0 deletions