From 50503f7f66b546f3545bf180371123b083c4db62 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 15 Jan 2025 22:09:16 +0100 Subject: [PATCH] refactor(tasks): rename current_pos to pos_at --- src/tasks.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tasks.rs b/src/tasks.rs index eafae69..5310413 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -1181,29 +1181,29 @@ impl TasksRelay { time = time + 1; } } - let current_pos = self.get_position_at(time); - if (time < Timestamp::now() || target.is_none()) && current_pos.1 == target { + let pos_at = self.get_position_at(time); + if (time < Timestamp::now() || target.is_none()) && pos_at.1 == target { warn!( "Already {} from {}", target.map_or("stopped time-tracking".to_string(), |id| format!( "tracking \"{}\"", self.get_task_title(&id) )), - format_timestamp_relative(¤t_pos.0), + format_timestamp_relative(&pos_at.0), ); return None; } info!("{}", match target { None => format!( "Stopping time-tracking of \"{}\" at {}", - current_pos.1.map_or("???".to_string(), |id| self.get_task_title(&id)), + pos_at.1.map_or("???".to_string(), |id| self.get_task_title(&id)), format_timestamp_relative(&time) ), Some(new_id) => format!( "Tracking \"{}\" from {}{}", self.get_task_title(&new_id), format_timestamp_relative(&time), - current_pos.1.filter(|id| id != &new_id).map(|id| + pos_at.1.filter(|id| id != &new_id).map(|id| format!(" replacing \"{}\"", self.get_task_title(&id))) .unwrap_or_default() )