diff options
| author | SAJJA EASWAR <eshwarsajja20@gmail.com> | 2026-01-25 22:59:36 +0530 |
|---|---|---|
| committer | SAJJA EASWAR <eshwarsajja20@gmail.com> | 2026-01-25 22:59:36 +0530 |
| commit | ebc8b94baa6bc694cb4829e2eb2934a1f17fa6a1 (patch) | |
| tree | 71b952ad455bf17d5bdea01472f0e2297f25eabe /std/stack.zc | |
| parent | 863118c95caac0d69a35f6ae4d2e83844734a8a1 (diff) | |
| parent | 489336b2101bf16edeec7bfc4379408eb19b936e (diff) | |
Merge branch 'main' into pr-109
Diffstat (limited to 'std/stack.zc')
| -rw-r--r-- | std/stack.zc | 4 |
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); } |
