From c094097af7689068760a5b8abc27aff88e1b2b31 Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 6 Apr 2024 17:54:07 +0200 Subject: [PATCH] don't show boats which are still on the water --- src/model/stat.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model/stat.rs b/src/model/stat.rs index bece501..05d7ea2 100644 --- a/src/model/stat.rs +++ b/src/model/stat.rs @@ -52,6 +52,10 @@ impl BoatStat { let name: String = row.get("name"); let location: String = row.get("location"); let year: i32 = row.get("year"); + if year == 0 { + continue; // Boat still on water + } + if !years.contains(&year) { years.push(year); }