diff options
| author | troido <troido@protonmail.com> | 2019-01-24 18:39:20 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2019-01-24 18:39:20 +0100 |
| commit | d4d03e2f6c495858faeb1560754a6f34a62e76d1 (patch) | |
| tree | a85dd15ec17d8d7f2b892bd14ec1065fd962a16b /src/doublemap.rs | |
git repo for rust version of asciifarm
Diffstat (limited to 'src/doublemap.rs')
| -rw-r--r-- | src/doublemap.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/doublemap.rs b/src/doublemap.rs new file mode 100644 index 0000000..add0803 --- /dev/null +++ b/src/doublemap.rs @@ -0,0 +1,17 @@ + +use std::Collections::HashMap; + +struct DoubleMap<K, V> { + keytoval: HashMap<K, V>, + valtokey: HashMap<V, K> +} + +impl DoubleMap<K, V> { + + pub fn new() -> DoubleMap<K, V> { + DoubleMap { + keytoval: HashMap::new(), + valtokey: HashMap::new() + + +} |
