Created
September 15, 2014 21:23
-
-
Save jasom/b4d9304c13120153534e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ExternalNode { | |
key: int, | |
value: int | |
} | |
fn main() { | |
let mut boxed_node = box ExternalNode{ key : 1, value: 2}; | |
match boxed_node { | |
box ExternalNode{key : ref fkey, value: ref mut val} => { | |
*val+=1; | |
} | |
} | |
} |
Author
jasom
commented
Sep 15, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment