From 96250864afc4c255e0cf87a58b65b1c6f6ebe0bc Mon Sep 17 00:00:00 2001 From: Radical Date: Tue, 29 Apr 2025 00:42:11 +0200 Subject: [PATCH] refactor: use unwrap_or() instead of unwrap_or_else() --- src/api/v1/stats.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/v1/stats.rs b/src/api/v1/stats.rs index 258160e..24053bc 100644 --- a/src/api/v1/stats.rs +++ b/src/api/v1/stats.rs @@ -20,7 +20,7 @@ pub async fn res(data: web::Data) -> impl Responder { let response = Response { accounts: 0, uptime: SystemTime::now().duration_since(data.start_time).expect("Seriously why dont you have time??").as_secs(), - version: String::from(VERSION.unwrap_or_else(|| "UNKNOWN")), + version: String::from(VERSION.unwrap_or("UNKNOWN")), build_number: String::from("how do i implement this?"), };