summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs
index 898ab1b..0fb46d0 100644
--- a/src/componentwrapper.rs
+++ b/src/componentwrapper.rs
@@ -202,11 +202,17 @@ components!(
};
Equipment () {panic!("equipment from parameters not implemented")};
CreationTime (time: Int) {CreationTime{time: Timestamp(time)}};
- Flags (flags: Strings) {
+ Flags (flags: List) {
Flags(
flags
.iter()
- .map(|f| Flag::from_str(f))
+ .map(|param| {
+ if let Parameter::String(f) = param {
+ Flag::from_str(f)
+ } else {
+ None
+ }
+ })
.collect::<Option<HashSet<Flag>>>().ok_or(aerr!("invalid flag name"))?
)
};