Created
April 16, 2014 16:40
-
-
Save jamorton/10904650 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 Symbol { | |
text: ~str, | |
usage: uint | |
} | |
struct SymbolStore { | |
// key should be a reference to the str owned by Symbol::text | |
// value should be a reference to the Symbol owned by the vec below | |
map: HashMap<str, Symbol>, | |
symbols: ~[Symbol] // vec owned these symbols | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment