Skip to content

Commit

Permalink
route/models: fix clippy significant_drop_in_scrutinee warning
Browse files Browse the repository at this point in the history
  • Loading branch information
stintel committed Apr 24, 2024
1 parent d7bd35c commit cbf47f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use crate::state::State;
pub async fn get(AxumState(state): AxumState<Arc<State>>) -> Response {
let mut model_names: Vec<String> = Vec::new();

for model_type in state.config.models.keys() {
let model_types = state.config.models.keys();
for model_type in model_types {
let Some(models) = state.config.models.get(model_type) else {
return AiRouterError::InternalServerError::<String>(format!(
"failed to get models of type {model_type:?}"
Expand Down

0 comments on commit cbf47f5

Please sign in to comment.