mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Remove unwrap in time check
This commit is contained in:
parent
a054202c1f
commit
c0ea57d71e
1 changed files with 5 additions and 1 deletions
|
@ -1334,7 +1334,11 @@ impl TaskwarriorTuiApp {
|
||||||
let mtime = fs::metadata(pending_fp)?.modified()?;
|
let mtime = fs::metadata(pending_fp)?.modified()?;
|
||||||
mtimes.push(mtime);
|
mtimes.push(mtime);
|
||||||
}
|
}
|
||||||
Ok(*mtimes.iter().max().unwrap())
|
if let Some(t) = mtimes.iter().max() {
|
||||||
|
Ok(*t)
|
||||||
|
} else {
|
||||||
|
Err(anyhow!("Unable to get task files max time"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tasks_changed_since(&mut self, prev: Option<SystemTime>) -> Result<bool> {
|
pub fn tasks_changed_since(&mut self, prev: Option<SystemTime>) -> Result<bool> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue