diff --git a/server/src/http/unleash_client.rs b/server/src/http/unleash_client.rs index 5f4562e5..f0e533b0 100644 --- a/server/src/http/unleash_client.rs +++ b/server/src/http/unleash_client.rs @@ -678,7 +678,7 @@ mod tests { fn expected_etag(features: ClientFeatures) -> String { let hash = features.xx3_hash().unwrap(); let len = serde_json::to_string(&features) - .map(|string| string.as_bytes().len()) + .map(|string| string.len()) .unwrap(); format!("{len:x}-{hash}") } diff --git a/server/src/metrics/client_metrics.rs b/server/src/metrics/client_metrics.rs index 4b9de354..e64d6261 100644 --- a/server/src/metrics/client_metrics.rs +++ b/server/src/metrics/client_metrics.rs @@ -107,7 +107,7 @@ pub struct MetricsCache { pub(crate) fn size_of_batch(batch: &MetricsBatch) -> usize { serde_json::to_string(batch) - .map(|s| s.as_bytes().len()) + .map(|s| s.len()) .unwrap_or(0) }