Cocos 执行错误去掉多余的 to_string
- cocos_execute/error.rs CodeInvalid 直接 clone 已拥有的 cause
This commit is contained in:
@@ -66,7 +66,7 @@ impl ToolFailure for CocosExecuteError {
|
||||
format!("Cocos 参数无效:{cause}")
|
||||
}
|
||||
Self::CodeNotText => "code 必须是 JavaScript 函数体。".to_string(),
|
||||
Self::CodeInvalid { cause } => cause.to_string(),
|
||||
Self::CodeInvalid { cause } => cause.clone(),
|
||||
Self::ExecutionBusy => {
|
||||
"已有 Cocos 操作执行中,请等待回执;本次调用没有发送执行命令,也不要重放。"
|
||||
.to_string()
|
||||
|
||||
Reference in New Issue
Block a user