diff options
author | Alex Auvolat <alex@adnab.me> | 2020-11-11 16:36:48 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-11-11 16:36:48 +0100 |
commit | 7d7b9e95a9b7fe71e7bb42b08a22698475a9c78c (patch) | |
tree | e0e8e02ddaed445ec331342c2b4328829accd889 /src/api/s3_list.rs | |
parent | 5a5592c176c7a17f143d0f221b6495808b7f4054 (diff) | |
download | garage-7d7b9e95a9b7fe71e7bb42b08a22698475a9c78c.tar.gz garage-7d7b9e95a9b7fe71e7bb42b08a22698475a9c78c.zip |
Simplify and_then(Some) as map() and remove move
Diffstat (limited to 'src/api/s3_list.rs')
-rw-r--r-- | src/api/s3_list.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/s3_list.rs b/src/api/s3_list.rs index 9e6bc0f5..f2b49a1d 100644 --- a/src/api/s3_list.rs +++ b/src/api/s3_list.rs @@ -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 }; |