Skip to content

Commit 6bc3c50

Browse files
RuoqingHeliuw
authored andcommitted
vfio-user: Fix clippy warning mismatched_lifetime_syntaxes
Fix clippy warning as Rust toolchain 1.89.0-beta.3 (b5e10d8c0 2025-07-02) suggested. ```console Error: --> vfio-user/examples/gpio/pci.rs:558:21 | 558 | pub fn get_bars(&self) -> PciBarIter { | ^^^^^ ---------- the lifetime gets resolved as `'_` | | | this lifetime flows to the output | = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]` help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 558 | pub fn get_bars(&self) -> PciBarIter<'_> { | ++++ ``` Signed-off-by: Ruoqing He <[email protected]>
1 parent cd948a2 commit 6bc3c50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vfio-user/examples/gpio/pci.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ impl PciConfiguration {
555555

556556
/// Returns an iterator of the currently configured base address registers.
557557
#[allow(dead_code)] // TODO(dverkamp): remove this once used
558-
pub fn get_bars(&self) -> PciBarIter {
558+
pub fn get_bars(&self) -> PciBarIter<'_> {
559559
PciBarIter {
560560
config: self,
561561
bar_num: 0,

0 commit comments

Comments
 (0)