Skip to content

Instantly share code, notes, and snippets.

@jamorton
Created April 16, 2014 16:40
Show Gist options
  • Save jamorton/10904650 to your computer and use it in GitHub Desktop.
Save jamorton/10904650 to your computer and use it in GitHub Desktop.
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