Skip to content

Commit 0a7b8f4

Browse files
fixed fmt issues
1 parent 8ee4ff1 commit 0a7b8f4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/mqtt/broker/connection.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
use std::cmp;
12
use std::fmt::{Debug, Display};
23
use std::pin::Pin;
34
use std::str::FromStr;
45
use std::sync::Arc;
56
use std::time::Duration;
6-
use std::cmp;
77

88
use bytes::BytesMut;
99
use color_eyre::eyre;
@@ -888,8 +888,11 @@ impl<S: MqttSocket> Connection<S> {
888888
self.send(Packet::UnsubAck(
889889
UnsubAck {
890890
pkid: unsub.pkid,
891-
reasons: std::iter::repeat_n(UnsubAckReason::PacketIdentifierInUse, unsub.filters.len())
892-
.collect(),
891+
reasons: std::iter::repeat_n(
892+
UnsubAckReason::PacketIdentifierInUse,
893+
unsub.filters.len(),
894+
)
895+
.collect(),
893896
},
894897
None,
895898
))

src/mqtt/trie/node.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ pub(super) struct NodeLeaf<T> {
1919

2020
impl<T> NodeLeaf<T> {
2121
pub(super) fn all(&self, f: &mut impl FnMut(&T) -> bool) -> bool {
22-
self.exact_val.as_ref().is_none_or(&mut *f)
23-
&& self.descendant_val.as_ref().is_none_or(f)
22+
self.exact_val.as_ref().is_none_or(&mut *f) && self.descendant_val.as_ref().is_none_or(f)
2423
}
2524

2625
fn is_empty(&self) -> bool {

0 commit comments

Comments
 (0)