@@ -76,8 +76,8 @@ impl PortsConfig {
76
76
async fn ports ( self ) -> Result < Range < u16 > > {
77
77
match self {
78
78
PortsConfig :: Range ( range) => Ok ( range) ,
79
- PortsConfig :: Len ( len) => PORTS . take ( len) . await ,
80
- PortsConfig :: ExactLen ( len) => PORTS . take_exact ( len) . await ,
79
+ PortsConfig :: Len ( len) => GLOBAL_PORTS . take ( len) . await ,
80
+ PortsConfig :: ExactLen ( len) => GLOBAL_PORTS . take_exact ( len) . await ,
81
81
}
82
82
}
83
83
}
@@ -231,12 +231,12 @@ impl Default for Ports {
231
231
/// Declares a shared storage for ports.
232
232
///
233
233
/// ```
234
- /// ports_store!(PORTS );
234
+ /// ports_store!(GLOBAL_PORTS );
235
235
///
236
236
/// #[tokio::test]
237
237
/// fn test1() {
238
238
/// let cluster = ClusterBuilder::default()
239
- /// .ports(PORTS .take(20).await.expect("enough ports"))
239
+ /// .ports(GLOBAL_PORTS .take(20).await.expect("enough ports"))
240
240
/// .start()
241
241
/// .await;
242
242
/// }
@@ -246,17 +246,17 @@ impl Default for Ports {
246
246
macro_rules! ports_store {
247
247
( $name: ident, $range: expr) => {
248
248
$crate:: lazy_static:: lazy_static! {
249
- static ref PORTS : $crate:: cluster:: Ports = $crate:: cluster:: Ports :: new( $range) ;
249
+ static ref $name : $crate:: cluster:: Ports = $crate:: cluster:: Ports :: new( $range) ;
250
250
}
251
251
} ;
252
252
( $name: ident) => {
253
253
$crate:: lazy_static:: lazy_static! {
254
- static ref PORTS : $crate:: cluster:: Ports = $crate:: cluster:: Ports :: default ( ) ;
254
+ static ref $name : $crate:: cluster:: Ports = $crate:: cluster:: Ports :: default ( ) ;
255
255
}
256
256
} ;
257
257
}
258
258
259
- ports_store ! ( PORTS ) ;
259
+ ports_store ! ( GLOBAL_PORTS ) ;
260
260
261
261
#[ derive( Debug , thiserror:: Error ) ]
262
262
pub enum Error {
0 commit comments