File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use iroh_net::magic_endpoint::accept_conn;
9
9
use iroh_net:: { derp:: DerpMode , key:: SecretKey , MagicEndpoint } ;
10
10
use iroh_net:: { NodeAddr , NodeId } ;
11
11
12
- use crate :: chat:: { send_msg, ChatId } ;
12
+ use crate :: chat:: send_msg;
13
13
use crate :: config:: Config ;
14
14
use crate :: context:: Context ;
15
15
use crate :: message:: { Message , MsgId , Viewtype } ;
@@ -62,7 +62,7 @@ impl Context {
62
62
} ;
63
63
64
64
let peers = self . get_gossip_peers ( msg_id) . await ?;
65
- if peers. len ( ) == 0 {
65
+ if peers. is_empty ( ) {
66
66
warn ! ( self , "joining gossip with zero peers" ) ;
67
67
}
68
68
@@ -191,7 +191,7 @@ impl Context {
191
191
let webxdc = Message :: load_from_db ( self , msg_id) . await ?;
192
192
msg. param . set_cmd ( SystemMessage :: IrohGossipAdvertisement ) ;
193
193
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 ?;
195
195
Ok ( ( ) )
196
196
}
197
197
}
Original file line number Diff line number Diff line change @@ -1564,7 +1564,7 @@ RETURNING id
1564
1564
for ( part, msg_id) in mime_parser. parts . iter ( ) . zip ( & created_db_entries) {
1565
1565
if part. typ == Viewtype :: Webxdc {
1566
1566
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 ( ) ;
1568
1568
let peer = context. get_iroh_node_addr ( ) . await ?. node_id ;
1569
1569
context. add_peer_for_topic ( * msg_id, topic, peer) . await ?;
1570
1570
} else {
You can’t perform that action at this time.
0 commit comments