fix(clippy): 修复冗余 into_iter、sort_by 及 match 嵌套 if 等 lint 警告

This commit is contained in:
fawney19
2026-04-17 01:43:45 +08:00
parent dde02e6111
commit faaaec28e1
12 changed files with 115 additions and 134 deletions

View File

@@ -581,10 +581,8 @@ fn convert_assistant_message(message: &Map<String, Value>) -> Option<Value> {
let mut text_parts = Vec::new();
match content {
Some(Value::String(text)) => {
if !text.is_empty() {
text_parts.push(text.clone());
}
Some(Value::String(text)) if !text.is_empty() => {
text_parts.push(text.clone());
}
Some(Value::Array(blocks)) => {
for block in blocks {