Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bschwind committed Nov 26, 2020
1 parent d039c9f commit f574fde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mqtt-v5-broker/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub enum WillDisconnectLogic {
#[derive(Debug)]
pub enum BrokerMessage {
NewClient(Box<ConnectPacket>, Sender<ClientMessage>),
Publish(String, PublishPacket),
Publish(String, Box<PublishPacket>),
PublishAck(String, PublishAckPacket), // TODO - This can be handled by the client task
PublishRelease(String, PublishReleasePacket), // TODO - This can be handled by the client task
PublishReceived(String, PublishReceivedPacket),
Expand Down Expand Up @@ -662,7 +662,7 @@ impl Broker {
self.handle_disconnect(client_id, will_disconnect_logic);
},
BrokerMessage::Publish(client_id, packet) => {
self.handle_publish(client_id, packet);
self.handle_publish(client_id, *packet);
},
BrokerMessage::PublishAck(client_id, packet) => {
self.handle_publish_ack(client_id, packet);
Expand Down
2 changes: 1 addition & 1 deletion mqtt-v5-broker/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<ST: Stream<Item = PacketResult> + Unpin, SI: Sink<Packet, Error = EncodeErr
}

broker_tx
.send(BrokerMessage::Publish(client_id.clone(), packet))
.send(BrokerMessage::Publish(client_id.clone(), Box::new(packet)))
.await
.expect("Couldn't send Publish message to broker");
},
Expand Down

0 comments on commit f574fde

Please sign in to comment.