Option Type: replace pattern matching by the corresponding syntaxic sugar #13

Merged
lx merged 2 commits from feature/syntaxic-sugar into master 2020-11-11 15:38:59 +00:00
Showing only changes of commit 7d7b9e95a9 - Show all commits

View file

@ -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
};