From e19174f124d14c35d11cf64efa3d8b7d811f83d0 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Tue, 5 Mar 2024 10:00:08 +1300 Subject: [PATCH] Fix loop continue/break (affects performance only) --- chorus-lib/src/store/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chorus-lib/src/store/mod.rs b/chorus-lib/src/store/mod.rs index 12def8d..a4d8d55 100644 --- a/chorus-lib/src/store/mod.rs +++ b/chorus-lib/src/store/mod.rs @@ -300,7 +300,7 @@ impl Store { // If we have gone beyond since, we can stop early // (We have to check because `since` might change in this loop) if event.created_at() < since { - continue 'per_event; + break 'per_event; } // check against the rest of the filter @@ -374,7 +374,7 @@ impl Store { // If we have gone beyond since, we can stop early // (We have to check because `since` might change in this loop) if event.created_at() < since { - continue 'per_event; + break 'per_event; } // check against the rest of the filter @@ -442,7 +442,7 @@ impl Store { // If we have gone beyond since, we can stop early // (We have to check because `since` might change in this loop) if event.created_at() < since { - continue 'per_event; + break 'per_event; } // check against the rest of the filter