From 0b6ca7379008ae1ddf10af1c25d8806a8048543f Mon Sep 17 00:00:00 2001 From: mohandasspat Date: Fri, 12 Aug 2022 12:44:14 +0530 Subject: [PATCH] review fixes --- meilisearch-http/src/routes/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meilisearch-http/src/routes/mod.rs b/meilisearch-http/src/routes/mod.rs index e27141875..594cbc48e 100644 --- a/meilisearch-http/src/routes/mod.rs +++ b/meilisearch-http/src/routes/mod.rs @@ -303,8 +303,7 @@ pub async fn get_metrics( .encode(&prometheus::gather(), &mut buffer) .expect("Failed to encode metrics"); - let response = String::from_utf8(buffer.clone()).expect("Failed to convert bytes to string"); - buffer.clear(); + let response = String::from_utf8(buffer).expect("Failed to convert bytes to string"); Ok(HttpResponse::Ok() .insert_header(header::ContentType(mime::TEXT_PLAIN))