Fix clippy lints
This commit is contained in:
1 parent
f4612b8f8d
commit
5ccfd6a0d8
2 files changed
+3
-2
No files matched your search
+1
-1
@@ -111,7 +111,7 @@ impl BcCamera {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return Err(Error::Timeout);
|
Err(Error::Timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn disconnect(&mut self) {
|
pub fn disconnect(&mut self) {
|
||||||
|
|||||||
+2
-1
@@ -242,7 +242,8 @@ fn do_camera_management(
|
|||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
// We'd like now_local() but it's deprecated - try to get the local time, but if no
|
// We'd like now_local() but it's deprecated - try to get the local time, but if no
|
||||||
// time zone, fall back to UTC.
|
// 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!(
|
warn!(
|
||||||
"{}: Camera has no time set, setting to {}",
|
"{}: Camera has no time set, setting to {}",
|
||||||
|
|||||||
Reference in new issue
Block a user