Fix get_bool_cfg()
This commit is contained in:
parent
9e5932f57c
commit
0e7d1730fc
1 changed files with 3 additions and 3 deletions
|
@ -55,12 +55,12 @@ fn get_bool_cfg(cfg: Option<&Value>, name: &str, on_fail: bool, on_unavail: bool
|
||||||
Some(&Value::Boolean(b)) => b,
|
Some(&Value::Boolean(b)) => b,
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
warn!("Configuration error, '{}' must be a Boolean (true|false).", name);
|
warn!("Configuration error, '{}' must be a Boolean (true|false).", name);
|
||||||
warn!("Assuming 'true' now.");
|
warn!("Assuming '{}' now.", on_fail);
|
||||||
on_fail
|
on_fail
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
debug!("No key '{}' - Assuming 'true'", name);
|
debug!("No key '{}' - Assuming '{}'", name, on_unavail);
|
||||||
on_fail
|
on_unavail
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue