Option Type: replace pattern matching by the corresponding syntaxic sugar #13
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()..];
|
let relative_key = &object.key[prefix.len()..];
|
||||||
relative_key
|
relative_key
|
||||||
.find(delimiter)
|
.find(delimiter)
|
||||||
.and_then(move |i| Some(&object.key[..prefix.len() + i + delimiter.len()]))
|
.map(|i| &object.key[..prefix.len() + i + delimiter.len()])
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue