diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-03-07 16:48:57 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-03-07 17:35:13 -0800 |
| commit | c9375fed8d55197a528edb3c3182aaf3b71abe76 (patch) | |
| tree | 2d1ed1a7f5954b14e4f92f8745908ad6f92355b8 /src/libstd/json.rs | |
| parent | c245d9e980946d4472e9c830a109db77e1bcb038 (diff) | |
stdlib: Stop incurring vtable dispatch costs when hashmaps are used
This required changing almost all users of hashmaps to import the hashmap interface first. The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
Diffstat (limited to 'src/libstd/json.rs')
| -rw-r--r-- | src/libstd/json.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 51069cf9729..26e4cc3165e 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -5,6 +5,7 @@ import result::{ok, err}; import io; import io::{reader_util, writer_util}; import map; +import map::hashmap; export json; export error; @@ -36,7 +37,7 @@ enum json { /* Variant: list */ list([json]), /* Variant: dict */ - dict(map::map<str,json>), + dict(map::hashmap<str,json>), /* Variant: null */ null, } |
