Skip to content

Commit 3c1a92e

Browse files
committed
use default
1 parent 4ee0c82 commit 3c1a92e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/llm/src/kv_router/scheduler.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff 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)]
235235
pub 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-
247239
impl 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
}

0 commit comments

Comments
 (0)