false positive
This commit is contained in:
parent
7e4c54867e
commit
3c1388fced
1 changed files with 3 additions and 0 deletions
3
src/cache/fs.rs
vendored
3
src/cache/fs.rs
vendored
|
@ -51,6 +51,9 @@ pub async fn read_file(
|
|||
ImageMetadata::deserialize(&mut de).ok()?
|
||||
};
|
||||
|
||||
// False positive, `file` is used in both cases, which means that it's not
|
||||
// possible to move this into a map_or_else without cloning `file`.
|
||||
#[allow(clippy::option_if_let_else)]
|
||||
let stream = if let Some(status) = WRITING_STATUS.read().await.get(path).map(Clone::clone) {
|
||||
CacheStream::Concurrent(ConcurrentFsStream::from_file(
|
||||
file,
|
||||
|
|
Loading…
Reference in a new issue