Skip to content

Instantly share code, notes, and snippets.

bjorn3

  • Somewhere, Earth
Block or report user

Report or block bjorn3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bjorn3
bjorn3 / playground.rs
Created Apr 5, 2018 — forked from rust-play/playground.rs
Code shared from the Rust Playground
View playground.rs
trait Kind<T> {
type Make;
}
enum OptionKind {}
impl<T> Kind<T> for OptionKind {
type Make = Option<T>;
}
@bjorn3
bjorn3 / playground.rs
Created Apr 5, 2018 — forked from rust-play/playground.rs
Code shared from the Rust Playground
View playground.rs
trait Kind<T> {
type Make;
}
enum OptionKind {}
impl<T> Kind<T> for OptionKind {
type Make = Option<T>;
}
View gist:e9956d455ea09ecf25a04dfbb3207e8e
loop {
for message in client.incoming_messages() {
match message.unwrap() {
OwnedMessage::Text(data) => data,
_ => None,
};
}
}
@bjorn3
bjorn3 / playground.rs
Created Feb 19, 2017 — forked from anonymous/playground.rs
Shared via Rust Playground
View playground.rs
type Memory = Vec<u64>;
enum Instr{
Call(Rvalue), // call *arg1
Jmp(Rvalue), // jmp *arg1
Print(Rvalue), // print *arg1
}
enum Lvalue{
Reg(Reg),
@bjorn3
bjorn3 / playground.rs
Last active Aug 1, 2016 — forked from anonymous/playground.rs
replace >> with > >
View playground.rs
#![feature(trace_macros)]#![feature(type_macros)]
trace_macros!(true);
macro_rules! example{
(@as_type $t:ty) => {$t};
() => {};
(>>) => {
> >
You can’t perform that action at this time.