refactor: use unwrap_or() instead of unwrap_or_else()

This commit is contained in:
Radical 2025-04-29 00:42:11 +02:00
parent 30a169679d
commit 96250864af

View file

@ -20,7 +20,7 @@ pub async fn res(data: web::Data<Data>) -> impl Responder {
let response = Response { let response = Response {
accounts: 0, accounts: 0,
uptime: SystemTime::now().duration_since(data.start_time).expect("Seriously why dont you have time??").as_secs(), 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?"), build_number: String::from("how do i implement this?"),
}; };