From d7be6f91cd15344fd5e94ae65dd83884af2a7370 Mon Sep 17 00:00:00 2001 From: Diego Reis Date: Sat, 21 Dec 2024 20:24:43 -0300 Subject: [PATCH] Fix formating and pass on tests --- bindings/wasm/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bindings/wasm/lib.rs b/bindings/wasm/lib.rs index 90f65af93..fbd2e09de 100644 --- a/bindings/wasm/lib.rs +++ b/bindings/wasm/lib.rs @@ -69,7 +69,6 @@ impl RowIterator { #[wasm_bindgen] pub fn next(&mut self) -> JsValue { - match self.inner.borrow_mut().step() { Ok(limbo_core::RowResult::Row(row)) => { let row_array = Array::new(); @@ -154,10 +153,12 @@ impl Statement { // Define the next method that will be called by JavaScript let next_fn = js_sys::Function::new_with_args( "", - "return { - value: this.iterator.next(), - done: this.value === undefined - };", + "const value = this.iterator.next(); + const done = value === undefined; + return { + value, + done + };", ); js_sys::Reflect::set(&iterator_obj, &JsValue::from_str("next"), &next_fn).unwrap();