From 20fc8f9a3ad574a8316ca6fa81eba9b0b21df096 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 20 Nov 2024 23:23:15 +0100 Subject: [PATCH] refactor: rename set_filter_from to since --- src/main.rs | 4 ++-- src/tasks.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1fc218c..f388aaa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -457,7 +457,7 @@ async fn main() -> Result<()> { None => { let today = Timestamp::now() - 80_000; info!("Filtering for tasks from the last 22 hours"); - if !tasks.set_filter_from(today) { + if !tasks.set_filter_since(today) { continue 'repl; } } @@ -475,7 +475,7 @@ async fn main() -> Result<()> { .or_else(|| parse_date(arg).map(|utc| utc.with_timezone(&Local))) .map(|time| { info!("Filtering for tasks from {}", format_datetime_relative(time)); - tasks.set_filter_from(time.to_timestamp()) + tasks.set_filter_since(time.to_timestamp()) }) .is_none_or(|b| !b) { continue 'repl; diff --git a/src/tasks.rs b/src/tasks.rs index a59334e..4433a45 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -673,7 +673,7 @@ impl TasksRelay { self.pubkey = Some(key) } - pub(crate) fn set_filter_from(&mut self, time: Timestamp) -> bool { + pub(crate) fn set_filter_since(&mut self, time: Timestamp) -> bool { // TODO filter at both ends self.set_filter(|t| t.last_state_update() > time) }