Fix the constructor explanation in the guide (#372)

This commit is contained in:
konstin
2018-07-03 16:24:43 +02:00
committed by Alex Crichton
parent 9339a55f3e
commit 66096804ce
3 changed files with 14 additions and 12 deletions

View File

@ -21,6 +21,7 @@ pub struct Foo {
#[wasm_bindgen]
impl Foo {
#[wasm_bindgen(constructor)]
pub fn new() -> Foo {
Foo { contents: 0 }
}