fmt
This commit is contained in:
parent
bd652c956f
commit
f74bcd3127
2 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
use std::fmt::Debug;
|
|
||||||
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||||
|
use std::fmt::Debug;
|
||||||
use wasm_bindgen::{prelude::Closure, JsValue};
|
use wasm_bindgen::{prelude::Closure, JsValue};
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
@ -45,8 +45,7 @@ impl<T: Debug> Debug for Event<T> {
|
||||||
/// @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`.
|
/// @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub async fn emit<T: Serialize>(event: &str, payload: &T) -> crate::Result<()> {
|
pub async fn emit<T: Serialize>(event: &str, payload: &T) -> crate::Result<()> {
|
||||||
inner::emit(event, serde_wasm_bindgen::to_value(payload)?)
|
inner::emit(event, serde_wasm_bindgen::to_value(payload)?).await?;
|
||||||
.await?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,7 +331,7 @@ impl WebviewWindow {
|
||||||
pub async fn set_cursor_position(&self, position: Position) -> crate::Result<()> {
|
pub async fn set_cursor_position(&self, position: Position) -> crate::Result<()> {
|
||||||
match position {
|
match position {
|
||||||
Position::Physical(pos) => self.0.setCursorPositionPhysical(pos.0).await?,
|
Position::Physical(pos) => self.0.setCursorPositionPhysical(pos.0).await?,
|
||||||
Position::Logical(pos) => self.0.setCursorPositionLogical(pos.0).await?
|
Position::Logical(pos) => self.0.setCursorPositionLogical(pos.0).await?,
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue