File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -551,9 +551,9 @@ impl InitFeatures {
551
551
/// Returns the set of known init features that are related to channels. At least some of
552
552
/// these features are likely required for peers to talk to us.
553
553
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 ( )
557
557
}
558
558
}
559
559
@@ -781,8 +781,9 @@ impl<T: sealed::GossipQueries> Features<T> {
781
781
782
782
impl < T : sealed:: InitialRoutingSync > Features < T > {
783
783
// 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
786
787
}
787
788
}
788
789
@@ -921,7 +922,7 @@ mod tests {
921
922
922
923
let mut init_features = InitFeatures :: known ( ) ;
923
924
assert ! ( init_features. initial_routing_sync( ) ) ;
924
- init_features. clear_initial_routing_sync ( ) ;
925
+ init_features = init_features . clear_initial_routing_sync ( ) ;
925
926
assert ! ( !init_features. initial_routing_sync( ) ) ;
926
927
}
927
928
You can’t perform that action at this time.
0 commit comments