aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/router.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-13 19:49:04 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-13 19:49:04 +0200
commitec50ffac42f90496495b054fad568a8553cffb64 (patch)
treeb13bbc3cdc7e22d746a732e03d14814acfbc8927 /src/api/k2v/router.rs
parentd7736cb614564d5bf5d501d4cf473ea98889d239 (diff)
downloadgarage-ec50ffac42f90496495b054fad568a8553cffb64.tar.gz
garage-ec50ffac42f90496495b054fad568a8553cffb64.zip
Remove useless string conversions
Diffstat (limited to 'src/api/k2v/router.rs')
-rw-r--r--src/api/k2v/router.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/k2v/router.rs b/src/api/k2v/router.rs
index 093fb9a7..50e6965b 100644
--- a/src/api/k2v/router.rs
+++ b/src/api/k2v/router.rs
@@ -62,7 +62,7 @@ impl Endpoint {
.unwrap_or((path.to_owned(), ""));
if bucket.is_empty() {
- return Err(Error::bad_request("Missing bucket name".to_owned()));
+ return Err(Error::bad_request("Missing bucket name"));
}
if *req.method() == Method::OPTIONS {
@@ -83,7 +83,7 @@ impl Endpoint {
Method::PUT => Self::from_put(partition_key, &mut query)?,
Method::DELETE => Self::from_delete(partition_key, &mut query)?,
_ if req.method() == method_search => Self::from_search(partition_key, &mut query)?,
- _ => return Err(Error::bad_request("Unknown method".to_owned())),
+ _ => return Err(Error::bad_request("Unknown method")),
};
if let Some(message) = query.nonempty_message() {