Skip to content

Instantly share code, notes, and snippets.

Peter Delevoryas peterdelevoryas

View GitHub Profile
View state-machine-pattern.rs
#[derive(Debug, PartialEq)]
enum State {
Waiting { waiting_time: usize },
Filling { rate: usize },
Done,
Failure(String),
}
#[derive(Debug, Clone, Copy)]
enum Event {
View ssa-interference.rs
#![feature(conservative_impl_trait)]
type Reg = usize;
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
struct Cpu {
reg: [isize; 3]
}
impl Cpu {
fn mov(&mut self, src: Reg, dst: Reg) {
You can’t perform that action at this time.