From b97b618b4bb1f3f4ad35bd96f05fd099f8fb6ecb Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Tue, 10 Sep 2019 17:32:44 +0000 Subject: [PATCH] Use sql.get_config_bool to simplify `dc_is_configured` --- src/configure/mod.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 86b5274fd..e8abb925d 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -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") } /*******************************************************************************