Skip to content

Commit

Permalink
Fix nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mossop committed Dec 5, 2024
1 parent 651be35 commit 078d90d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/homeassistant/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ pub(super) struct DiscoverySerializer<'a, const A: usize, C: Component, S: Seria
pub(super) inner: S,
}

impl<const A: usize, C: Component, S: Serializer> Serializer
for DiscoverySerializer<'_, A, C, S>
{
impl<const A: usize, C: Component, S: Serializer> Serializer for DiscoverySerializer<'_, A, C, S> {
type Ok = S::Ok;
type Error = S::Error;
type SerializeSeq = S::SerializeSeq;
Expand Down
26 changes: 23 additions & 3 deletions src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,32 @@ use embassy_sync::{
use embassy_time::Timer;
use embedded_io_async::Write;
use mqttrs::{
decode_slice, Connect, ConnectReturnCode, LastWill, Packet, Pid, Protocol, Publish, QoS, QosPid,
decode_slice,
Connect,
ConnectReturnCode,
LastWill,
Packet,
Pid,
Protocol,
Publish,
QoS,
QosPid,
};

use crate::{
device_id, Buffer, ControlMessage, Error, MqttMessage, Payload, Publishable, Topic,
TopicString, CONFIRMATION_TIMEOUT, DATA_CHANNEL, DEFAULT_BACKOFF, RESET_BACKOFF,
device_id,
Buffer,
ControlMessage,
Error,
MqttMessage,
Payload,
Publishable,
Topic,
TopicString,
CONFIRMATION_TIMEOUT,
DATA_CHANNEL,
DEFAULT_BACKOFF,
RESET_BACKOFF,
};

static WRITE_BUFFER: Mutex<CriticalSectionRawMutex, Buffer<4096>> = Mutex::new(Buffer::new());
Expand Down
8 changes: 6 additions & 2 deletions src/topic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ use mqttrs::{Packet, QoS, Subscribe, SubscribeReturnCodes, SubscribeTopic, Unsub
#[cfg(feature = "serde")]
use crate::publish::PublishJson;
use crate::{
device_id, device_type,
device_id,
device_type,
io::{assign_pid, send_packet, subscribe},
publish::{PublishBytes, PublishDisplay},
ControlMessage, Error, TopicString, CONFIRMATION_TIMEOUT,
ControlMessage,
Error,
TopicString,
CONFIRMATION_TIMEOUT,
};

/// An MQTT topic that is optionally prefixed with the device type and unique ID.
Expand Down

0 comments on commit 078d90d

Please sign in to comment.