aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-11-11 16:36:48 +0100
committerAlex Auvolat <alex@adnab.me>2020-11-11 16:36:48 +0100
commit7d7b9e95a9b7fe71e7bb42b08a22698475a9c78c (patch)
treee0e8e02ddaed445ec331342c2b4328829accd889
parent5a5592c176c7a17f143d0f221b6495808b7f4054 (diff)
downloadgarage-7d7b9e95a9b7fe71e7bb42b08a22698475a9c78c.tar.gz
garage-7d7b9e95a9b7fe71e7bb42b08a22698475a9c78c.zip
Simplify and_then(Some) as map() and remove move
-rw-r--r--src/api/s3_list.rs2
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
};