aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authortrinity-1686a <trinity@deuxfleurs.fr>2024-12-22 15:26:06 +0100
committertrinity-1686a <trinity@deuxfleurs.fr>2024-12-22 15:26:06 +0100
commitc939d2a936e60e8cb67ecae7a35706e7b7d73ab6 (patch)
tree81f0d77bc9d3001503ac50aefd71991a2642c691 /src/web
parent65e9dde8c99a4c1406e58da0741c9e566d18b1ff (diff)
downloadgarage-c939d2a936e60e8cb67ecae7a35706e7b7d73ab6.tar.gz
garage-c939d2a936e60e8cb67ecae7a35706e7b7d73ab6.zip
clippy
Diffstat (limited to 'src/web')
-rw-r--r--src/web/web_server.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/web/web_server.rs b/src/web/web_server.rs
index dfdbf8a2..c497270a 100644
--- a/src/web/web_server.rs
+++ b/src/web/web_server.rs
@@ -476,8 +476,8 @@ impl RoutingResult {
/// which is also AWS S3 behavior.
///
/// Check: https://docs.aws.amazon.com/AmazonS3/latest/userguide/IndexDocumentSupport.html
-fn path_to_keys<'a>(
- path: &'a str,
+fn path_to_keys(
+ path: &str,
index: &str,
routing_rules: &[RoutingRule],
) -> Result<RoutingResult, Error> {
@@ -488,7 +488,7 @@ fn path_to_keys<'a>(
None => return Err(Error::BadRequest("Path must start with a / (slash)".into())),
};
- let is_bucket_root = base_key.len() == 0;
+ let is_bucket_root = base_key.is_empty();
let is_trailing_slash = path_utf8.ends_with("/");
let key = if is_bucket_root || is_trailing_slash {