File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ impl Discover for StaticDiscover {
165165 }
166166}
167167
168- /// [`WeightedStaticDiscover`] is a simple implementation of [`Discover`] that returns a static list of
169- /// instances with weight.
168+ /// [`WeightedStaticDiscover`] is a simple implementation of [`Discover`] that returns a static list
169+ /// of instances with weight.
170170#[ derive( Clone ) ]
171171pub struct WeightedStaticDiscover {
172172 instances : Vec < Arc < Instance > > ,
Original file line number Diff line number Diff line change @@ -162,12 +162,16 @@ where
162162
163163#[ cfg( test) ]
164164mod tests {
165- use super :: { LoadBalance , WeightedRandomBalance } ;
166- use crate :: discovery:: WeightedStaticDiscover ;
167- use crate :: { context:: Endpoint , discovery:: StaticDiscover } ;
168- use rand:: { rng, RngCore } ;
169165 use std:: collections:: HashMap ;
170166
167+ use rand:: { rng, RngCore } ;
168+
169+ use super :: { LoadBalance , WeightedRandomBalance } ;
170+ use crate :: {
171+ context:: Endpoint ,
172+ discovery:: { StaticDiscover , WeightedStaticDiscover } ,
173+ } ;
174+
171175 #[ tokio:: test]
172176 async fn test_weighted_random ( ) {
173177 let empty = Endpoint :: new ( "" . into ( ) ) ;
You can’t perform that action at this time.
0 commit comments