fix clippy

This commit is contained in:
Evan Almloff committed 2023-01-27 20:35:46 -06:00
1 parent 624f32115b
commit b6c7d44a27
37 files changed
+96 -107

No files matched your search

+2 -3
View File
@@ -207,13 +207,12 @@ impl DesktopContext {
"method":"eval_result",
"params": (
function(){{
{}
{code}
}}
)()
}})
);
"#,
code
"#
);
if let Err(e) = self.webview.evaluate_script(&script) {
+1 -1
View File
@@ -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})"));
}
+2 -3
View File
@@ -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
"#
)
}