编辑器执行错误去掉多余的 to_string
- editor_execute/error.rs EditorRejected 直接 clone 已拥有的 cause
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user