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)) tokio::time::sleep(std::time::Duration::from_secs(current_wait as u64))
.await; .await;
match conn { let Connection { rx: r, tx: t, .. } = conn;
Connection { rx: r, tx: t, .. } => {
rx = r; rx = r;
tx = t; tx = t;
}
};
current_wait = (current_wait * 2).clamp(START_WAIT, MAX_WAIT); current_wait = (current_wait * 2).clamp(START_WAIT, MAX_WAIT);
} else { } else {
// we are shutting down here, so don't care if this fails // 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) Ok(rx)
} }
#[derive(Deserialize, Serialize, PartialEq, Default, Clone, Copy, Debug)] #[derive(Deserialize, Serialize, PartialEq, Eq, Default, Clone, Copy, Debug)]
#[serde(rename_all = "lowercase")] #[serde(rename_all = "lowercase")]
pub enum RegisterType { pub enum RegisterType {
#[default] #[default]

View File

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