summaryrefslogtreecommitdiff
path: root/examples/data_structures
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-31 17:22:17 +0000
committerGitHub <noreply@github.com>2026-01-31 17:22:17 +0000
commit962d659c61212b1a23acfe56dda7cb92b721feda (patch)
treeba1637d3885213095b312f81a477c33b1ebca6aa /examples/data_structures
parente521ee7d175393ef37579ebd61ccb7e8d56a397f (diff)
parent91ed9fdd65e09bd6cd32e44dd07c390f2cf79c22 (diff)
Merge branch 'main' into main
Diffstat (limited to 'examples/data_structures')
-rw-r--r--examples/data_structures/stack.zc8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/data_structures/stack.zc b/examples/data_structures/stack.zc
index 4a8593a..ea6a20a 100644
--- a/examples/data_structures/stack.zc
+++ b/examples/data_structures/stack.zc
@@ -1,11 +1,11 @@
import "std.zc"
-struct Stack<T> {
+struct MyStack<T> {
data: Vec<T>;
}
-impl Stack<T> {
+impl MyStack<T> {
fn new() -> Self {
return Self { data: Vec<T>::new() };
}
@@ -43,7 +43,7 @@ impl Stack<T> {
fn main() {
"[Integer Stack]";
- let int_stack = Stack<int>::new();
+ let int_stack = MyStack<int>::new();
defer int_stack.free();
"Pushing: 10, 20, 30";
@@ -64,7 +64,7 @@ fn main() {
"";
"[String Stack]";
- let str_stack = Stack<String>::new();
+ let str_stack = MyStack<String>::new();
defer str_stack.free();
str_stack.push(String::new("First"));