mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 01:21:01 +00:00
Simplify and_then(Some) as map() and remove move
This commit is contained in:
parent
5a5592c176
commit
7d7b9e95a9
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ pub async fn handle_list(
|
|||
let relative_key = &object.key[prefix.len()..];
|
||||
relative_key
|
||||
.find(delimiter)
|
||||
.and_then(move |i| Some(&object.key[..prefix.len() + i + delimiter.len()]))
|
||||
.map(|i| &object.key[..prefix.len() + i + delimiter.len()])
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue