浏览器试玩错误去掉多余的 to_string
- browser_playtest/error.rs PlaytestFailed 直接 clone 已拥有的 cause
This commit is contained in:
@@ -24,7 +24,7 @@ pub(crate) enum BrowserPlaytestError {
|
||||
impl ToolFailure for BrowserPlaytestError {
|
||||
fn to_user_msg(&self) -> String {
|
||||
match self {
|
||||
Self::PlaytestFailed { cause } => cause.to_string(),
|
||||
Self::PlaytestFailed { cause } => cause.clone(),
|
||||
Self::PlaytestNotPassed { report, .. } => format!("浏览器试玩未通过:{report}"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user