diff --git a/linkerd/app/inbound/src/metrics/authz.rs b/linkerd/app/inbound/src/metrics/authz.rs index c7d17a3352..5f53c1e097 100644 --- a/linkerd/app/inbound/src/metrics/authz.rs +++ b/linkerd/app/inbound/src/metrics/authz.rs @@ -61,7 +61,7 @@ struct TcpInner { pub struct HTTPLocalRateLimitLabels { pub server: ServerLabel, pub rate_limit: Option>, - pub scope: String, + pub scope: &'static str, } #[derive(Debug, Hash, PartialEq, Eq)] diff --git a/linkerd/app/inbound/src/policy.rs b/linkerd/app/inbound/src/policy.rs index c55ee9d5fc..3acfaa8fec 100644 --- a/linkerd/app/inbound/src/policy.rs +++ b/linkerd/app/inbound/src/policy.rs @@ -140,8 +140,8 @@ impl AllowPolicy { use RateLimitError::*; let scope = match error { - Total(_) => "total".to_string(), - PerIdentity(_) | Override(_) => "identity".to_string(), + Total(_) => "total", + PerIdentity(_) | Override(_) => "identity", }; HTTPLocalRateLimitLabels { server: self.server_label(),