From 4c3011ecd2600945c37a1098bd8045cfaf57b8b6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 10 Oct 2020 19:23:14 +0100 Subject: [PATCH] example iterator method Signed-off-by: Ian Jackson --- wasm/wasm.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wasm/wasm.rs b/wasm/wasm.rs index 347ec4b3..53922406 100644 --- a/wasm/wasm.rs +++ b/wasm/wasm.rs @@ -14,3 +14,8 @@ const X : &'static str = "invalid value passed to wasm"; pub fn mutable(s: String) -> ZCoordIterator { ZCoordIterator(ZCoord::from_str(&s).ok_or(X)?.clone_mut()) } + +#[wasm_bindgen] +impl ZCoordIterator { + pub fn next(&mut self) -> () { } +} -- 2.30.2