* Use from string instead of from_anyhow anyhow! * Clippy
@@ -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"))
}