Skip to content

Instantly share code, notes, and snippets.

View teovoinea's full-sized avatar
🦀

Teodor Voinea teovoinea

🦀
View GitHub Profile
var foo = {
a: 1
};
var bar = {
a: 2,
b: "bar"
};
function X() {
@teovoinea
teovoinea / generics.rs
Last active November 24, 2017 15:24
Simple Rust trait demo
// Generic implementer for trait X
macro_rules! X_impl {
($($t:ty)*) => ($(
impl X for $t {
#[inline]
fn X(&self){ println!("a is {:?}", self.a); }
}
)*)
}

Keybase proof

I hereby claim:

  • I am teovoinea on github.
  • I am teovoinea (https://keybase.io/teovoinea) on keybase.
  • I have a public key whose fingerprint is BEDF AFF0 7F21 4AE4 276F B820 06AE BD2E 61A7 E81A

To claim this, I am signing this object: