Skip to content

Commit b083724

Browse files
committed
nit: checking if the build runs
1 parent 1469507 commit b083724

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/analytics.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ pub struct Report {
9494

9595
impl Report {
9696
pub async fn new() -> anyhow::Result<Self> {
97-
let uptime = uptime_lib::get().unwrap();
98-
let upt = uptime.as_secs_f64();
97+
let mut upt: f64 = 0.0;
98+
if let Ok(uptime) = uptime_lib::get() {
99+
upt = uptime.as_secs_f64();
100+
}
99101

100102
refresh_sys_info();
101103
let mut os_version = "Unknown".to_string();

0 commit comments

Comments
 (0)