fix clippy
This commit is contained in:
1 parent
624f32115b
commit
b6c7d44a27
37 files changed
+96
-107
No files matched your search
@@ -207,13 +207,12 @@ impl DesktopContext {
|
||||
"method":"eval_result",
|
||||
"params": (
|
||||
function(){{
|
||||
{}
|
||||
{code}
|
||||
}}
|
||||
)()
|
||||
}})
|
||||
);
|
||||
"#,
|
||||
code
|
||||
"#
|
||||
);
|
||||
|
||||
if let Err(e) = self.webview.evaluate_script(&script) {
|
||||
|
||||
@@ -326,5 +326,5 @@ fn send_edits(edits: Mutations, webview: &WebView) {
|
||||
let serialized = serde_json::to_string(&edits).unwrap();
|
||||
|
||||
// todo: use SSE and binary data to send the edits with lower overhead
|
||||
_ = webview.evaluate_script(&format!("window.interpreter.handleEdits({})", serialized));
|
||||
_ = webview.evaluate_script(&format!("window.interpreter.handleEdits({serialized})"));
|
||||
}
|
||||
@@ -11,15 +11,14 @@ fn module_loader(root_name: &str) -> String {
|
||||
<script>
|
||||
{INTERPRETER_JS}
|
||||
|
||||
let rootname = "{}";
|
||||
let rootname = "{root_name}";
|
||||
let root = window.document.getElementById(rootname);
|
||||
if (root != null) {{
|
||||
window.interpreter = new Interpreter(root);
|
||||
window.ipc.postMessage(serializeIpcMessage("initialize"));
|
||||
}}
|
||||
</script>
|
||||
"#,
|
||||
root_name
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user