clippy: remove/replace needless explicit lifetimes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
81281d04a4
commit
96b7483138
@ -480,11 +480,11 @@ impl SessionImpl {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn lookup<'a>(
|
async fn lookup(
|
||||||
&'a self,
|
&'_ self,
|
||||||
parent: u64,
|
parent: u64,
|
||||||
file_name: &OsStr,
|
file_name: &OsStr,
|
||||||
) -> Result<(EntryParam, LookupRef<'a>), Error> {
|
) -> Result<(EntryParam, LookupRef<'_>), Error> {
|
||||||
let dir = self.open_dir(parent).await?;
|
let dir = self.open_dir(parent).await?;
|
||||||
|
|
||||||
let entry = match { dir }.lookup(file_name).await? {
|
let entry = match { dir }.lookup(file_name).await? {
|
||||||
@ -519,10 +519,10 @@ impl SessionImpl {
|
|||||||
to_stat(inode, &entry)
|
to_stat(inode, &entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn readdirplus<'a>(
|
async fn readdirplus(
|
||||||
&'a self,
|
&'_ self,
|
||||||
request: &mut requests::ReaddirPlus,
|
request: &mut requests::ReaddirPlus,
|
||||||
) -> Result<Vec<LookupRef<'a>>, Error> {
|
) -> Result<Vec<LookupRef<'_>>, Error> {
|
||||||
let mut lookups = Vec::new();
|
let mut lookups = Vec::new();
|
||||||
let offset = usize::try_from(request.offset)
|
let offset = usize::try_from(request.offset)
|
||||||
.map_err(|_| io_format_err!("directory offset out of range"))?;
|
.map_err(|_| io_format_err!("directory offset out of range"))?;
|
||||||
|
@ -173,7 +173,7 @@ impl<K: std::cmp::Eq + std::hash::Hash + Copy, V> LruCache<K, V> {
|
|||||||
/// Get a mutable reference to the value identified by `key`.
|
/// Get a mutable reference to the value identified by `key`.
|
||||||
/// This will update the cache entry to be the most recently used entry.
|
/// This will update the cache entry to be the most recently used entry.
|
||||||
/// On cache misses, None is returned.
|
/// On cache misses, None is returned.
|
||||||
pub fn get_mut<'a>(&'a mut self, key: K) -> Option<&'a mut V> {
|
pub fn get_mut(&mut self, key: K) -> Option<&mut V> {
|
||||||
let node_ptr = self.map.get(&key)?;
|
let node_ptr = self.map.get(&key)?;
|
||||||
self.list.bring_to_front(*node_ptr);
|
self.list.bring_to_front(*node_ptr);
|
||||||
Some(unsafe { &mut (*self.list.head).value })
|
Some(unsafe { &mut (*self.list.head).value })
|
||||||
|
@ -142,7 +142,7 @@ impl From<TimeSpan> for f64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn verify_time_span<'a>(i: &'a str) -> Result<(), Error> {
|
pub fn verify_time_span(i: &str) -> Result<(), Error> {
|
||||||
parse_time_span(i)?;
|
parse_time_span(i)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user