diff --git a/src/lib.rs b/src/lib.rs index 3b0e08e..eb9c4b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +#![warn(clippy::unwrap_used)] + pub mod api; pub mod backend; pub mod cli; diff --git a/src/protocol/screencopy.rs b/src/protocol/screencopy.rs index 3a9c776..a9e291d 100644 --- a/src/protocol/screencopy.rs +++ b/src/protocol/screencopy.rs @@ -395,7 +395,9 @@ impl Screencopy { }); // Notify client about successful copy. - let time = UNIX_EPOCH.elapsed().unwrap(); + let time = UNIX_EPOCH + .elapsed() + .expect("failed to get time since UNIX_EPOCH"); let tv_sec_hi = (time.as_secs() >> 32) as u32; let tv_sec_lo = (time.as_secs() & 0xFFFFFFFF) as u32; let tv_nsec = time.subsec_nanos();