File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -551,9 +551,9 @@ impl InitFeatures {
551551 /// Returns the set of known init features that are related to channels. At least some of
552552 /// these features are likely required for peers to talk to us.
553553 pub fn known_channel_features ( ) -> InitFeatures {
554- let mut features = Self :: known ( ) . clear_gossip_queries ( ) ;
555- features . clear_initial_routing_sync ( ) ;
556- features
554+ Self :: known ( )
555+ . clear_initial_routing_sync ( )
556+ . clear_gossip_queries ( )
557557 }
558558}
559559
@@ -781,8 +781,9 @@ impl<T: sealed::GossipQueries> Features<T> {
781781
782782impl < T : sealed:: InitialRoutingSync > Features < T > {
783783 // Note that initial_routing_sync is ignored if gossip_queries is set.
784- pub ( crate ) fn clear_initial_routing_sync ( & mut self ) {
785- <T as sealed:: InitialRoutingSync >:: clear_bits ( & mut self . flags )
784+ pub ( crate ) fn clear_initial_routing_sync ( mut self ) -> Self {
785+ <T as sealed:: InitialRoutingSync >:: clear_bits ( & mut self . flags ) ;
786+ self
786787 }
787788}
788789
@@ -921,7 +922,7 @@ mod tests {
921922
922923 let mut init_features = InitFeatures :: known ( ) ;
923924 assert ! ( init_features. initial_routing_sync( ) ) ;
924- init_features. clear_initial_routing_sync ( ) ;
925+ init_features = init_features . clear_initial_routing_sync ( ) ;
925926 assert ! ( !init_features. initial_routing_sync( ) ) ;
926927 }
927928
You can’t perform that action at this time.
0 commit comments