summaryrefslogtreecommitdiff
path: root/examples/data_structures
diff options
context:
space:
mode:
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"));