Warn for unwrap in lib

This commit is contained in:
Ottatop 2024-04-04 00:25:17 -05:00
parent 97511b001a
commit 4ff49385f5
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,5 @@
#![warn(clippy::unwrap_used)]
pub mod api;
pub mod backend;
pub mod cli;

View file

@ -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();