Skip to content

Instantly share code, notes, and snippets.

@bjorn3
bjorn3 / playground.rs
Created February 19, 2017 16:26 — forked from anonymous/playground.rs
Shared via Rust Playground
type Memory = Vec<u64>;
enum Instr{
Call(Rvalue), // call *arg1
Jmp(Rvalue), // jmp *arg1
Print(Rvalue), // print *arg1
}
enum Lvalue{
Reg(Reg),
loop {
for message in client.incoming_messages() {
match message.unwrap() {
OwnedMessage::Text(data) => data,
_ => None,
};
}
}
@bjorn3
bjorn3 / playground.rs
Created April 5, 2018 15:57 — forked from rust-play/playground.rs
Code shared from the Rust Playground
trait Kind<T> {
type Make;
}
enum OptionKind {}
impl<T> Kind<T> for OptionKind {
type Make = Option<T>;
}
@bjorn3
bjorn3 / playground.rs
Created April 5, 2018 16:12 — forked from rust-play/playground.rs
Code shared from the Rust Playground
trait Kind<T> {
type Make;
}
enum OptionKind {}
impl<T> Kind<T> for OptionKind {
type Make = Option<T>;
}