Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Septias committed Mar 14, 2024
1 parent f5a426c commit 7f531cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/peer_channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use iroh_net::magic_endpoint::accept_conn;
use iroh_net::{derp::DerpMode, key::SecretKey, MagicEndpoint};
use iroh_net::{NodeAddr, NodeId};

use crate::chat::{send_msg, ChatId};
use crate::chat::send_msg;
use crate::config::Config;
use crate::context::Context;
use crate::message::{Message, MsgId, Viewtype};
Expand Down Expand Up @@ -62,7 +62,7 @@ impl Context {
};

let peers = self.get_gossip_peers(msg_id).await?;
if peers.len() == 0 {
if peers.is_empty() {
warn!(self, "joining gossip with zero peers");
}

Expand Down Expand Up @@ -191,7 +191,7 @@ impl Context {
let webxdc = Message::load_from_db(self, msg_id).await?;
msg.param.set_cmd(SystemMessage::IrohGossipAdvertisement);
msg.in_reply_to = Some(webxdc.rfc724_mid.clone());
send_msg(&self, webxdc.chat_id, &mut msg).await?;
send_msg(self, webxdc.chat_id, &mut msg).await?;
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/receive_imf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ RETURNING id
for (part, msg_id) in mime_parser.parts.iter().zip(&created_db_entries) {
if part.typ == Viewtype::Webxdc {
if let Some(topic) = mime_parser.get_header(HeaderDef::GossipTopic) {
let topic = TopicId::from_str(&topic).unwrap();
let topic = TopicId::from_str(topic).unwrap();
let peer = context.get_iroh_node_addr().await?.node_id;
context.add_peer_for_topic(*msg_id, topic, peer).await?;
} else {
Expand Down

0 comments on commit 7f531cb

Please sign in to comment.