aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_list.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-02-23 18:46:25 +0100
committerAlex Auvolat <alex@adnab.me>2021-02-23 18:46:25 +0100
commit40763fd749f36fe612f20f79ff7cac51252cc128 (patch)
treec43e3a8190a3323a93a7253c8095e33add817a7f /src/api/s3_list.rs
parent6e6f7e8555ad488a8b4d67ba640ddad933aa2654 (diff)
downloadgarage-40763fd749f36fe612f20f79ff7cac51252cc128.tar.gz
garage-40763fd749f36fe612f20f79ff7cac51252cc128.zip
Cargo fmt
Diffstat (limited to 'src/api/s3_list.rs')
-rw-r--r--src/api/s3_list.rs18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/api/s3_list.rs b/src/api/s3_list.rs
index 2be47091..98d774db 100644
--- a/src/api/s3_list.rs
+++ b/src/api/s3_list.rs
@@ -229,10 +229,20 @@ pub async fn handle_list(
} else {
// TODO: are these supposed to be urlencoded when encoding-type is URL??
if let Some(mkr) = &query.marker {
- writeln!(&mut xml, "\t<Marker>{}</Marker>", xml_encode_key(mkr, query.urlencode_resp)).unwrap();
+ writeln!(
+ &mut xml,
+ "\t<Marker>{}</Marker>",
+ xml_encode_key(mkr, query.urlencode_resp)
+ )
+ .unwrap();
}
if let Some(next_marker) = truncated {
- writeln!(&mut xml, "\t<NextMarker>{}</NextMarker>", xml_encode_key(&next_marker, query.urlencode_resp)).unwrap();
+ writeln!(
+ &mut xml,
+ "\t<NextMarker>{}</NextMarker>",
+ xml_encode_key(&next_marker, query.urlencode_resp)
+ )
+ .unwrap();
}
}
@@ -272,6 +282,6 @@ pub async fn handle_list(
debug!("{}", xml);
Ok(Response::builder()
- .header("Content-Type", "application/xml")
- .body(Body::from(xml.into_bytes()))?)
+ .header("Content-Type", "application/xml")
+ .body(Body::from(xml.into_bytes()))?)
}