fixed number detection bug

This commit is contained in:
2022-05-24 16:06:10 +02:00
parent 112424d27a
commit 578f3dcc2f
+1 -1
View File
@@ -41,9 +41,9 @@ impl EventHandler for Handler {
.content
.split_ascii_whitespace()
.filter_map(|w| w.parse().ok())
.next()
.map(Duration::from_secs)
.filter(|d| ALLOWED_DURATION_RANGE.contains(d))
.next()
.unwrap_or(DEFAULT_CONTEST_DURATION);
if let Err(err) = run_contest(