Skip to content

Commit 7f531cb

Browse files
committed
clippy
1 parent f5a426c commit 7f531cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/peer_channels.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use iroh_net::magic_endpoint::accept_conn;
99
use iroh_net::{derp::DerpMode, key::SecretKey, MagicEndpoint};
1010
use iroh_net::{NodeAddr, NodeId};
1111

12-
use crate::chat::{send_msg, ChatId};
12+
use crate::chat::send_msg;
1313
use crate::config::Config;
1414
use crate::context::Context;
1515
use crate::message::{Message, MsgId, Viewtype};
@@ -62,7 +62,7 @@ impl Context {
6262
};
6363

6464
let peers = self.get_gossip_peers(msg_id).await?;
65-
if peers.len() == 0 {
65+
if peers.is_empty() {
6666
warn!(self, "joining gossip with zero peers");
6767
}
6868

@@ -191,7 +191,7 @@ impl Context {
191191
let webxdc = Message::load_from_db(self, msg_id).await?;
192192
msg.param.set_cmd(SystemMessage::IrohGossipAdvertisement);
193193
msg.in_reply_to = Some(webxdc.rfc724_mid.clone());
194-
send_msg(&self, webxdc.chat_id, &mut msg).await?;
194+
send_msg(self, webxdc.chat_id, &mut msg).await?;
195195
Ok(())
196196
}
197197
}

src/receive_imf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ RETURNING id
15641564
for (part, msg_id) in mime_parser.parts.iter().zip(&created_db_entries) {
15651565
if part.typ == Viewtype::Webxdc {
15661566
if let Some(topic) = mime_parser.get_header(HeaderDef::GossipTopic) {
1567-
let topic = TopicId::from_str(&topic).unwrap();
1567+
let topic = TopicId::from_str(topic).unwrap();
15681568
let peer = context.get_iroh_node_addr().await?.node_id;
15691569
context.add_peer_for_topic(*msg_id, topic, peer).await?;
15701570
} else {

0 commit comments

Comments
 (0)