diff options
| author | troido <troido@protonmail.com> | 2020-05-19 23:49:26 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-05-19 23:49:26 +0200 |
| commit | f98a024a06fef04fc40b29204f50d6e3a9089e10 (patch) | |
| tree | 1e65730eede1200f593ba2e4053210bab194d83a /src/componentwrapper.rs | |
| parent | b7e3d2a51441a2c51d0cacd6f874fc8b260579e9 (diff) | |
implemented fromtoparameter for hashmap and hashset
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 21 |
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 { |
