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))
|
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
|
||||||
|
|
|
@ -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]
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue