From b892e70bb5205d66bf31245701739fcb21ab1312 Mon Sep 17 00:00:00 2001 From: Sander Hautvast Date: Mon, 14 Feb 2022 12:50:23 +0100 Subject: [PATCH] main method --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 32cac34..ebfafc1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,12 @@ -fn main() {} +fn main() { + let mut list = List::new(); + list.push(1); + println!("push(1) : {:?}", list); + list.push(2); + println!("push(2) : {:?}", list); + println!("pop() -> {} : {:?}",list.pop().unwrap(),list); + println!("pop() -> {} : {:?}",list.pop().unwrap(),list); +} #[derive(Debug)] pub struct List {