/api/schema.rs: implement Schema::Option

This commit is contained in:
Dietmar Maurer
2019-01-18 17:40:37 +01:00
parent fdb95d92dd
commit 0a35462c1e
4 changed files with 44 additions and 20 deletions

View File

@ -75,7 +75,7 @@ pub fn parse_arguments<T: AsRef<str>>(
None => {
let mut want_bool = false;
let mut can_default = false;
if let Some((_optional, param_schema)) = properties.get::<str>(&name) {
if let Some(param_schema) = properties.get::<str>(&name) {
if let Schema::Boolean(boolean_schema) = param_schema.as_ref() {
want_bool = true;
if let Some(default) = boolean_schema.default {