aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v
diff options
context:
space:
mode:
authorAlex <lx@deuxfleurs.fr>2025-01-29 20:42:56 +0000
committerAlex <lx@deuxfleurs.fr>2025-01-29 20:42:56 +0000
commit6ed78abb5cd09f4e5ca5effe5d6137faf33133f8 (patch)
treec33690f411436ef2022f847447027fbcf2feb41a /src/api/k2v
parent5560a963e048f6bb000fc37b7e7ad73dbe96f3ab (diff)
parent19454c1679352012f1953949d02880e34820039f (diff)
downloadgarage-6ed78abb5cd09f4e5ca5effe5d6137faf33133f8.tar.gz
garage-6ed78abb5cd09f4e5ca5effe5d6137faf33133f8.zip
Merge pull request 'admin API refactoring (step 1)' (#939) from refactor-admin into next-v2
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/939
Diffstat (limited to 'src/api/k2v')
-rw-r--r--src/api/k2v/api_server.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs
index de6e5f06..863452e6 100644
--- a/src/api/k2v/api_server.rs
+++ b/src/api/k2v/api_server.rs
@@ -1,3 +1,4 @@
+use std::borrow::Cow;
use std::sync::Arc;
use async_trait::async_trait;
@@ -181,8 +182,8 @@ impl ApiHandler for K2VApiServer {
}
impl ApiEndpoint for K2VApiEndpoint {
- fn name(&self) -> &'static str {
- self.endpoint.name()
+ fn name(&self) -> Cow<'static, str> {
+ Cow::Borrowed(self.endpoint.name())
}
fn add_span_attributes(&self, span: SpanRef<'_>) {