Fix clippy lints

This commit is contained in:
George Hilliard committed 2020-12-14 22:40:28 -06:00
1 parent f4612b8f8d
commit 5ccfd6a0d8
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@ impl BcCamera {
});
}
return Err(Error::Timeout);
Err(Error::Timeout)
}
pub fn disconnect(&mut self) {
+2 -1
View File
@@ -242,7 +242,8 @@ fn do_camera_management(
use time::OffsetDateTime;
// We'd like now_local() but it's deprecated - try to get the local time, but if no
// time zone, fall back to UTC.
let new_time = OffsetDateTime::try_now_local().unwrap_or(OffsetDateTime::now_utc());
let new_time =
OffsetDateTime::try_now_local().unwrap_or_else(|_| OffsetDateTime::now_utc());
warn!(
"{}: Camera has no time set, setting to {}",