fix: leaner error handling by boxing large variants

This commit is contained in:
Per Stark
2026-06-06 07:59:57 +02:00
parent 4e20da538d
commit ac0d34bfbd
12 changed files with 238 additions and 83 deletions
+1 -2
View File
@@ -233,8 +233,7 @@ fn plan_embedding_settings_update(
.as_deref()
.map(str::trim)
.filter(|value| !value.is_empty())
.map(ToOwned::to_owned)
.unwrap_or_else(|| current.embedding_model.clone());
.map_or_else(|| current.embedding_model.clone(), ToOwned::to_owned);
if !is_valid_fastembed_model_code(&embedding_model) {
return Err(AppError::Validation(format!(