Address clippy lints
parent
6b7e184389
commit
d5a02420f2
|
@ -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, .. } => {
|
||||
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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue