File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 11## 0.50.0
22
3+ - Relax ` Behaviour::with_metrics ` requirements, do not require DataTransform and TopicSubscriptionFilter to also impl Default
4+ See [ PR XXXX] ( https://github.com/libp2p/rust-libp2p/pull/6097 )
5+
36- Remove ` Rpc ` from the public API.
47 See [ PR 6091] ( https://github.com/libp2p/rust-libp2p/pull/6091 )
58
Original file line number Diff line number Diff line change @@ -360,18 +360,6 @@ where
360360 D :: default ( ) ,
361361 )
362362 }
363-
364- /// Allow the [`Behaviour`] to also record metrics.
365- /// Metrics can be evaluated by passing a reference to a [`Registry`].
366- #[ cfg( feature = "metrics" ) ]
367- pub fn with_metrics (
368- mut self ,
369- metrics_registry : & mut Registry ,
370- metrics_config : MetricsConfig ,
371- ) -> Self {
372- self . metrics = Some ( Metrics :: new ( metrics_registry, metrics_config) ) ;
373- self
374- }
375363}
376364
377365impl < D , F > Behaviour < D , F >
@@ -469,6 +457,18 @@ where
469457 gossip_promises : Default :: default ( ) ,
470458 } )
471459 }
460+
461+ /// Allow the [`Behaviour`] to also record metrics.
462+ /// Metrics can be evaluated by passing a reference to a [`Registry`].
463+ #[ cfg( feature = "metrics" ) ]
464+ pub fn with_metrics (
465+ mut self ,
466+ metrics_registry : & mut Registry ,
467+ metrics_config : MetricsConfig ,
468+ ) -> Self {
469+ self . metrics = Some ( Metrics :: new ( metrics_registry, metrics_config) ) ;
470+ self
471+ }
472472}
473473
474474impl < D , F > Behaviour < D , F >
You can’t perform that action at this time.
0 commit comments