File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -231,23 +231,15 @@ pub fn process_worker_selection(
231231}
232232
233233// Default implementation matching the Python _cost_function
234- #[ derive( Debug , Clone ) ]
234+ #[ derive( Debug , Clone , Default ) ]
235235pub struct DefaultWorkerSelector {
236236 pub kv_router_config : KvRouterConfig ,
237237}
238238
239- impl Default for DefaultWorkerSelector {
240- fn default ( ) -> Self {
241- Self {
242- kv_router_config : KvRouterConfig :: default ( ) ,
243- }
244- }
245- }
246-
247239impl DefaultWorkerSelector {
248240 pub fn new ( kv_router_config : Option < KvRouterConfig > ) -> Self {
249241 Self {
250- kv_router_config : kv_router_config. unwrap_or ( KvRouterConfig :: default ( ) ) ,
242+ kv_router_config : kv_router_config. unwrap_or_default ( ) ,
251243 }
252244 }
253245}
You can’t perform that action at this time.
0 commit comments