1
0
Fork 0

Address clippy lints

auto-prerelease
Bo Jeanes 2022-09-11 17:41:52 +10:00
parent 6b7e184389
commit d5a02420f2
3 changed files with 5 additions and 8 deletions

View File

@ -60,12 +60,9 @@ pub(crate) async fn run(
tokio::time::sleep(std::time::Duration::from_secs(current_wait as u64))
.await;
match conn {
Connection { rx: r, tx: t, .. } => {
rx = r;
tx = t;
}
};
let Connection { rx: r, tx: t, .. } = conn;
rx = r;
tx = t;
current_wait = (current_wait * 2).clamp(START_WAIT, MAX_WAIT);
} else {
// we are shutting down here, so don't care if this fails

View File

@ -95,7 +95,7 @@ pub(crate) async fn subscribe(mqtt: &mqtt::Handle) -> crate::Result<mpsc::Receiv
Ok(rx)
}
#[derive(Deserialize, Serialize, PartialEq, Default, Clone, Copy, Debug)]
#[derive(Deserialize, Serialize, PartialEq, Eq, Default, Clone, Copy, Debug)]
#[serde(rename_all = "lowercase")]
pub enum RegisterType {
#[default]

View File

@ -62,7 +62,7 @@ impl Shutdown {
pub(crate) async fn recv(&mut self) {
// If the shutdown signal has already been received, then return
// immediately.
if self.shutdown {
if self.is_shutdown() {
return;
}