File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1239,14 +1239,6 @@ where
12391239
12401240 let mut iwant_ids = HashSet :: new ( ) ;
12411241
1242- let want_message = |id : & MessageId | {
1243- if self . duplicate_cache . contains ( id) {
1244- return false ;
1245- }
1246-
1247- !self . gossip_promises . contains ( id)
1248- } ;
1249-
12501242 for ( topic, ids) in ihave_msgs {
12511243 // only process the message if we are subscribed
12521244 if !self . mesh . contains_key ( & topic) {
@@ -1257,7 +1249,13 @@ where
12571249 continue ;
12581250 }
12591251
1260- for id in ids. into_iter ( ) . filter ( want_message) {
1252+ for id in ids. into_iter ( ) . filter ( |id| {
1253+ if self . duplicate_cache . contains ( id) {
1254+ return false ;
1255+ }
1256+
1257+ !self . gossip_promises . contains ( id)
1258+ } ) {
12611259 // have not seen this message and are not currently requesting it
12621260 if iwant_ids. insert ( id) {
12631261 // Register the IWANT metric
You can’t perform that action at this time.
0 commit comments