Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
curry-like committed Oct 2, 2023
1 parent 6f60120 commit 94f6281
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct MqttClient {

impl MqttClient {
pub fn new(sender: tokio::sync::mpsc::Sender<Command>) -> Self {
MqttClient { sender: sender }
MqttClient { sender }
}
}

Expand All @@ -34,10 +34,7 @@ impl TransferClient for MqttClient {
async fn send(&self, value: Value) -> Result<bool, NodeXError> {
let (tx, rx) = oneshot::channel();

let command = Command::Send {
value: value,
resp: tx,
};
let command = Command::Send { value, resp: tx };

self.sender.send(command).await.map_err(|e| {
log::error!("{:?}", e.to_string());
Expand Down

0 comments on commit 94f6281

Please sign in to comment.