From f0bfa4955a2f2775423f6f4878e45607a9ff0f73 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 12 Oct 2024 14:05:18 -0400 Subject: [PATCH] Fix some warnings about elided lifetimes these popped up on the latest rustc Signed-off-by: Kent Overstreet --- bch_bindgen/src/bkey.rs | 2 +- bch_bindgen/src/btree.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bch_bindgen/src/bkey.rs b/bch_bindgen/src/bkey.rs index eab070c6a..91d515b73 100644 --- a/bch_bindgen/src/bkey.rs +++ b/bch_bindgen/src/bkey.rs @@ -64,7 +64,7 @@ impl<'a, 'b> BkeySC<'a> { BkeySCToText { k: self, fs } } - pub fn v(&'a self) -> BkeyValC { + pub fn v(&'a self) -> BkeyValC<'a> { unsafe { let ty: c::bch_bkey_type = transmute(self.k.type_ as u32); diff --git a/bch_bindgen/src/btree.rs b/bch_bindgen/src/btree.rs index ba3ec87c3..337911782 100644 --- a/bch_bindgen/src/btree.rs +++ b/bch_bindgen/src/btree.rs @@ -15,7 +15,7 @@ pub struct BtreeTrans<'f> { } impl<'f> BtreeTrans<'f> { - pub fn new(fs: &'f Fs) -> BtreeTrans { + pub fn new(fs: &'f Fs) -> BtreeTrans<'f> { unsafe { BtreeTrans { raw: &mut *c::__bch2_trans_get(fs.raw, 0), @@ -81,7 +81,7 @@ impl<'t> BtreeIter<'t> { } } - pub fn peek_upto<'i>(&'i mut self, end: c::bpos) -> Result, bch_errcode> { + pub fn peek_upto<'i>(&'i mut self, end: c::bpos) -> Result>, bch_errcode> { unsafe { let k = c::bch2_btree_iter_peek_upto(&mut self.raw, end); errptr_to_result_c(k.k).map(|_| { @@ -146,7 +146,7 @@ impl<'t> BtreeNodeIter<'t> { locks_want: u32, depth: u32, flags: BtreeIterFlags, - ) -> BtreeNodeIter { + ) -> BtreeNodeIter<'t> { unsafe { let mut iter: MaybeUninit = MaybeUninit::uninit(); c::bch2_trans_node_iter_init(