mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2025-01-05 19:53:55 +03:00
parent
df09df42d1
commit
53d6e00b70
@ -75,7 +75,7 @@ use wasm_bindgen::prelude::*;
|
||||
pub fn collect_numbers(some_iterable: &JsValue) -> Result<js_sys::Array, JsValue> {
|
||||
let nums = js_sys::Array::new();
|
||||
|
||||
let iterator = match js_sys::try_iter(some_iterable)?.ok_or_else(|| {
|
||||
let iterator = js_sys::try_iter(some_iterable)?.ok_or_else(|| {
|
||||
"need to pass iterable JS values!".into()
|
||||
})?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user