summaryrefslogtreecommitdiff
path: root/src/model/array.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-05 17:47:33 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-05 17:47:33 +0100
commit9a99beec94a5b02aa91a363b299d4795ef52c0fa (patch)
tree0119a005ad8256b641a59d20645c5dbd16a7955c /src/model/array.rs
parent93138e2d4bb7dbc09ab6ef3c6e139881a8f3bc61 (diff)
Fix `array.pop()`
Diffstat (limited to 'src/model/array.rs')
-rw-r--r--src/model/array.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/model/array.rs b/src/model/array.rs
index be35c651..12abac4e 100644
--- a/src/model/array.rs
+++ b/src/model/array.rs
@@ -84,9 +84,8 @@ impl Array {
}
/// Remove the last value in the array.
- pub fn pop(&mut self) -> StrResult<()> {
- Arc::make_mut(&mut self.0).pop().ok_or_else(array_is_empty)?;
- Ok(())
+ pub fn pop(&mut self) -> StrResult<Value> {
+ Arc::make_mut(&mut self.0).pop().ok_or_else(array_is_empty)
}
/// Insert a value at the specified index.