mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 12:14:05 +03:00
chore: use from string instead of from_anyhow
anyhow!
(#10282)
* Use from string instead of from_anyhow anyhow! * Clippy
This commit is contained in:
parent
3c17fb64fd
commit
506f1dd873
@ -211,7 +211,7 @@ impl<'de, R: Runtime, TSend: Clone> CommandArg<'de, R> for Channel<TSend> {
|
||||
JavaScriptChannelId::from_str(&value)
|
||||
.map(|id| id.channel_on(webview))
|
||||
.map_err(|_| {
|
||||
InvokeError::from_anyhow(anyhow::anyhow!(
|
||||
InvokeError::from(format!(
|
||||
"invalid channel value `{value}`, expected a string in the `{IPC_PAYLOAD_PREFIX}ID` format"
|
||||
))
|
||||
})
|
||||
|
@ -932,9 +932,7 @@ impl<'de, R: Runtime> CommandArg<'de, R> for WebviewWindow<R> {
|
||||
if webview.window().is_webview_window() {
|
||||
Ok(Self { webview })
|
||||
} else {
|
||||
Err(InvokeError::from_anyhow(anyhow::anyhow!(
|
||||
"current webview is not a WebviewWindow"
|
||||
)))
|
||||
Err(InvokeError::from("current webview is not a WebviewWindow"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user