summaryrefslogtreecommitdiff
path: root/std/stack.zc
diff options
context:
space:
mode:
authorsuresh <sureshkrishnan.ai@gmail.com>2026-01-25 11:43:23 -0500
committersuresh <sureshkrishnan.ai@gmail.com>2026-01-25 11:43:23 -0500
commit26a0b55ed5bce4ad0ba2af109cfc96da7be2e34c (patch)
tree35ba8d7742b8ac727bfc6c4c73ab8b70f6eedb53 /std/stack.zc
parent0bb69cb67078dfa921b5b8a42275ef31dfbc9a56 (diff)
parent489336b2101bf16edeec7bfc4379408eb19b936e (diff)
Merge branch 'main' into JsonType
# Conflicts: # examples/data/json_config.zc
Diffstat (limited to 'std/stack.zc')
-rw-r--r--std/stack.zc4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/stack.zc b/std/stack.zc
index db02f2d..9b4d375 100644
--- a/std/stack.zc
+++ b/std/stack.zc
@@ -21,7 +21,7 @@ impl Stack<T> {
}
fn clone(self) -> Stack<T> {
- var new_stack = Stack<T>::new();
+ let new_stack = Stack<T>::new();
new_stack.len = self.len;
new_stack.cap = self.cap;
new_stack.data = malloc(sizeof(T) * new_stack.cap);
@@ -44,7 +44,7 @@ impl Stack<T> {
fn pop(self) -> Option<T> {
if (self.len > 0) {
- var value = self.data[self.len - 1];
+ let value = self.data[self.len - 1];
self.len = self.len - 1;
return Option<T>::Some(value);
}