diff options
Diffstat (limited to 'matrix-std/src/iter.rs')
-rw-r--r-- | matrix-std/src/iter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/matrix-std/src/iter.rs b/matrix-std/src/iter.rs index 638755c..c0e0c63 100644 --- a/matrix-std/src/iter.rs +++ b/matrix-std/src/iter.rs @@ -365,7 +365,7 @@ fn unzip((vm, frame): VmArgs, args: Vec<Value>) -> Result<Value> { if vals.len() != 2 { return error!("unzip only works over a iterator of pairs"); } - let [l, r] = vals.try_into().unwrap(); + let [l, r] = vals.try_into().map_err(|_| exception!(RUNTIME_EXCEPTION, "can only unzip over a set of pairs"))?; ll.push(l); lr.push(r); } |