Use sql.get_config_bool to simplify dc_is_configured

This commit is contained in:
Dmitry Bogatov
2019-09-10 17:32:44 +00:00
parent bb12488200
commit b97b618b4b

View File

@@ -46,16 +46,7 @@ pub unsafe fn configure(context: &Context) {
/// Check if the context is already configured.
pub fn dc_is_configured(context: &Context) -> bool {
if context
.sql
.get_config_int(context, "configured")
.unwrap_or_default()
> 0
{
true
} else {
false
}
context.sql.get_config_bool(context, "configured")
}
/*******************************************************************************