编辑器执行错误去掉多余的 to_string

- editor_execute/error.rs EditorRejected 直接 clone 已拥有的 cause
This commit is contained in:
2026-10-02 14:40:19 +08:00
parent dd115778e9
commit 0dda4cd78e
@@ -104,7 +104,7 @@ impl ToolFailure for EditorExecuteError {
got_bytes,
max_bytes,
} => format!("code 有 {got_bytes} 字节,超过上限 {max_bytes} 字节。"),
Self::EditorRejected { cause } => cause.to_string(),
Self::EditorRejected { cause } => cause.clone(),
Self::ExecutionNotCompleted { editor, report } => {
format!("{} 执行未完成:{report}", editor.label())
}