repl.it
@pyelias/

linked-list

Rust

my brain go ouchy

fork
loading
Files
  • main.rs
  • list.rs
  • main.4s37gsrti678ik8u.rcgu.o
  • main.main.7rcbfp3g-cgu.0.rcgu.o
  • main.main.7rcbfp3g-cgu.1.rcgu.o
  • main.main.7rcbfp3g-cgu.2.rcgu.o
  • main.main.7rcbfp3g-cgu.3.rcgu.o
  • main.main.7rcbfp3g-cgu.4.rcgu.o
  • main.main.7rcbfp3g-cgu.5.rcgu.o
  • main.main.7rcbfp3g-cgu.6.rcgu.o
  • main.main.7rcbfp3g-cgu.8.rcgu.o
  • main.main.7rcbfp3g-cgu.9.rcgu.o
main.rs
1
2
3
4
5
6
7
8
9
10
11
mod list;

fn main() {
  let mut l = list::List::new();
  l.push(1);
  // *l.peek_mut().unwrap() = 2;
  // println!("{}", l[0]);
  // println!("{}", l.peek().unwrap());
  println!("{}", l.pop() == Some(2));
  println!("{}", l.pop() == None);
}