Enhance error types

This commit is contained in:
Matthias Beyer 2017-12-22 11:49:20 +01:00
parent 986dbad2fd
commit 2bf91fab09

View file

@ -23,11 +23,11 @@ use store::Result;
use error::StoreError as SE;
use error::StoreErrorKind as SEK;
use toml_query::read::TomlValueReadExt;
/// Checks whether the store configuration has a key "implicit-create" which maps to a boolean
/// value. If that key is present, the boolean is returned, otherwise false is returned.
pub fn config_implicit_store_create_allowed(config: &Option<Value>) -> Result<bool> {
use toml_query::read::TomlValueReadExt;
let key = "store.implicit-create";
if let Some(ref t) = *config {