From 9a99beec94a5b02aa91a363b299d4795ef52c0fa Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 5 Feb 2023 17:47:33 +0100 Subject: Fix `array.pop()` --- src/model/array.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/model/array.rs') 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 { + Arc::make_mut(&mut self.0).pop().ok_or_else(array_is_empty) } /// Insert a value at the specified index. -- cgit v1.2.3