File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ impl Discover for StaticDiscover {
165
165
}
166
166
}
167
167
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.
170
170
#[ derive( Clone ) ]
171
171
pub struct WeightedStaticDiscover {
172
172
instances : Vec < Arc < Instance > > ,
Original file line number Diff line number Diff line change @@ -162,12 +162,16 @@ where
162
162
163
163
#[ cfg( test) ]
164
164
mod tests {
165
- use super :: { LoadBalance , WeightedRandomBalance } ;
166
- use crate :: discovery:: WeightedStaticDiscover ;
167
- use crate :: { context:: Endpoint , discovery:: StaticDiscover } ;
168
- use rand:: { rng, RngCore } ;
169
165
use std:: collections:: HashMap ;
170
166
167
+ use rand:: { rng, RngCore } ;
168
+
169
+ use super :: { LoadBalance , WeightedRandomBalance } ;
170
+ use crate :: {
171
+ context:: Endpoint ,
172
+ discovery:: { StaticDiscover , WeightedStaticDiscover } ,
173
+ } ;
174
+
171
175
#[ tokio:: test]
172
176
async fn test_weighted_random ( ) {
173
177
let empty = Endpoint :: new ( "" . into ( ) ) ;
You can’t perform that action at this time.
0 commit comments