summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-05-19 23:49:26 +0200
committertroido <troido@protonmail.com>2020-05-19 23:49:26 +0200
commitf98a024a06fef04fc40b29204f50d6e3a9089e10 (patch)
tree1e65730eede1200f593ba2e4053210bab194d83a /src/componentwrapper.rs
parentb7e3d2a51441a2c51d0cacd6f874fc8b260579e9 (diff)
implemented fromtoparameter for hashmap and hashset
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs
index c5d95c5..2619d9c 100644
--- a/src/componentwrapper.rs
+++ b/src/componentwrapper.rs
@@ -216,26 +216,7 @@ components!(all:
};
Ear () {Ear::default()};
Build (obj: Template);
- Whitelist (
- allowed: Vec<(String, Vec<String>)>, ({
- Whitelist.allowed.iter().map(|(item, players)|
- (item.clone(), players.iter().map(|playerid| playerid.name.clone()).collect())
- ).collect()
- })
- ) {
- Whitelist {
- allowed: allowed
- .into_iter()
- .map(|(item, names)| (
- item,
- names
- .into_iter()
- .map(|name| PlayerId{name})
- .collect::<HashSet<PlayerId>>()
- ))
- .collect()
- }
- };
+ Whitelist (allowed: HashMap<String, HashSet<PlayerId>>);
Dedup (id: String, priority: i64);
Minable (trigger: String, total: i64) {
Minable {