🐛 forgot to use default if unwrap fails
This commit is contained in:
parent
9befc9780d
commit
485a7ac223
1 changed files with 3 additions and 3 deletions
|
@ -45,9 +45,9 @@ pub fn bg_from_video(video: &Path) -> PathBuf {
|
||||||
seconds.push(c);
|
seconds.push(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let hours: i32 = hours.parse().unwrap();
|
let hours: i32 = hours.parse().unwrap_or_default();
|
||||||
let mut minutes: i32 = minutes.parse().unwrap();
|
let mut minutes: i32 = minutes.parse().unwrap_or_default();
|
||||||
let mut seconds: i32 = seconds.parse().unwrap();
|
let mut seconds: i32 = seconds.parse().unwrap_or_default();
|
||||||
minutes += hours * 60;
|
minutes += hours * 60;
|
||||||
seconds += minutes * 60;
|
seconds += minutes * 60;
|
||||||
at_second = seconds / 5;
|
at_second = seconds / 5;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue