@@ -76,8 +76,8 @@ impl PortsConfig {
7676 async fn ports ( self ) -> Result < Range < u16 > > {
7777 match self {
7878 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 ,
8181 }
8282 }
8383}
@@ -231,12 +231,12 @@ impl Default for Ports {
231231/// Declares a shared storage for ports.
232232///
233233/// ```
234- /// ports_store!(PORTS );
234+ /// ports_store!(GLOBAL_PORTS );
235235///
236236/// #[tokio::test]
237237/// fn test1() {
238238/// let cluster = ClusterBuilder::default()
239- /// .ports(PORTS .take(20).await.expect("enough ports"))
239+ /// .ports(GLOBAL_PORTS .take(20).await.expect("enough ports"))
240240/// .start()
241241/// .await;
242242/// }
@@ -246,17 +246,17 @@ impl Default for Ports {
246246macro_rules! ports_store {
247247 ( $name: ident, $range: expr) => {
248248 $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) ;
250250 }
251251 } ;
252252 ( $name: ident) => {
253253 $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 ( ) ;
255255 }
256256 } ;
257257}
258258
259- ports_store ! ( PORTS ) ;
259+ ports_store ! ( GLOBAL_PORTS ) ;
260260
261261#[ derive( Debug , thiserror:: Error ) ]
262262pub enum Error {
0 commit comments