Skip to content

Commit

Permalink
fix deprecation worning
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Mar 10, 2024
1 parent 5e62034 commit 9966f63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/blocks/tea_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {

let format = config.format.with_default(" $icon {$minutes:$seconds |}")?;

let increment = Duration::seconds(config.increment.unwrap_or(30));
let increment =
Duration::try_seconds(config.increment.unwrap_or(30)).error("invalid increment value")?;
let mut timer_end = Utc::now();

let mut timer_was_active = false;
Expand Down

0 comments on commit 9966f63

Please sign in to comment.