Merge pull request #48 from ashleygwilliams/readme-oops

fix(doc): update readme code example
master
ashley williams 7 years ago committed by GitHub
commit 96acdb873e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      README.md

@ -57,7 +57,7 @@ this project is written in rust. [get rust] to work on this project.
use wasm_bindgen::prelude::*; use wasm_bindgen::prelude::*;
``` ```
4. annotate your public functions with `#[wasm_bindgen]` and `#[no_mangle]`, for example: 4. annotate your public functions with `#[wasm_bindgen]`, for example:
```rust ```rust
#[wasm_bindgen] #[wasm_bindgen]
@ -66,8 +66,7 @@ this project is written in rust. [get rust] to work on this project.
} }
#[wasm_bindgen] #[wasm_bindgen]
#[no_mangle] pub fn greet(name: &str) {
pub extern fn greet(name: &str) {
alert(&format!("Hello, {}!", name)); alert(&format!("Hello, {}!", name));
} }
``` ```

Loading…
Cancel
Save