rust/example/std_example.rs

26 lines
386 B
Rust
Raw Normal View History

2019-02-16 15:42:20 +01:00
#![feature(core_intrinsics)]
2019-02-11 19:40:07 +01:00
use std::io::Write;
fn main() {
2019-06-27 20:49:39 +02:00
assert_eq!((1u128 + 2) as u16, 3);
}
#[derive(PartialEq)]
enum LoopState {
Continue(()),
Break(())
2019-02-11 19:40:07 +01:00
}
pub enum Instruction {
Increment,
Loop,
}
fn map(a: Option<(u8, Box<Instruction>)>) -> Option<Box<Instruction>> {
match a {
None => None,
Some((_, instr)) => Some(instr),
}
}