We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1469507 commit b083724Copy full SHA for b083724
src/analytics.rs
@@ -94,8 +94,10 @@ pub struct Report {
94
95
impl Report {
96
pub async fn new() -> anyhow::Result<Self> {
97
- let uptime = uptime_lib::get().unwrap();
98
- let upt = uptime.as_secs_f64();
+ let mut upt: f64 = 0.0;
+ if let Ok(uptime) = uptime_lib::get() {
99
+ upt = uptime.as_secs_f64();
100
+ }
101
102
refresh_sys_info();
103
let mut os_version = "Unknown".to_string();
0 commit comments