Skip to content

Commit

Permalink
style: applied rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Jan 29, 2024
1 parent 1280e96 commit 1dc6d7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/vanilla/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ use wasm_bindgen::prelude::*;
use web_sys::window;

fn start_app() {
let document = window().and_then(|win| win.document()).expect("Could not access document");
let document = window()
.and_then(|win| win.document())
.expect("Could not access document");
let body = document.body().expect("Could not access document.body");
let text_node = document.create_text_node("Hello, world from Vanilla Rust!");
body.append_child(text_node.as_ref()).expect("Failed to append text");
body.append_child(text_node.as_ref())
.expect("Failed to append text");
}

#[wasm_bindgen(inline_js = "export function snippetTest() { console.log('Hello from JS FFI!'); }")]
Expand Down

0 comments on commit 1dc6d7a

Please sign in to comment.