From 2bac41d6419f86bea973d5ef371b70c225d7107c Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Sun, 6 Apr 2025 23:02:32 +0200 Subject: [PATCH] minor performance improvement... and makes rust happy :-) --- src/station/routes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/station/routes.rs b/src/station/routes.rs index 445da53..d850b45 100644 --- a/src/station/routes.rs +++ b/src/station/routes.rs @@ -180,7 +180,7 @@ async fn view(State(db): State>, session: Session, axum::extract "Um einen Standort zu wählen, auf einen Punkt in der Karte klicken" } } - @if let (Some(_), Some(_)) = (station.lat, station.lng) { + @if station.lat.is_some() && station.lng.is_some() { a href=(format!("/station/{}/location-clear", station.id)) onclick="return confirm('Bist du sicher, dass du den Standort der Station löschen willst? Das kann _NICHT_ mehr rückgängig gemacht werden.');"{ "Standort löschen"