Enhance error types
This commit is contained in:
parent
986dbad2fd
commit
2bf91fab09
1 changed files with 2 additions and 2 deletions
|
@ -23,11 +23,11 @@ use store::Result;
|
||||||
use error::StoreError as SE;
|
use error::StoreError as SE;
|
||||||
use error::StoreErrorKind as SEK;
|
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
|
/// 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.
|
/// 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> {
|
pub fn config_implicit_store_create_allowed(config: &Option<Value>) -> Result<bool> {
|
||||||
|
use toml_query::read::TomlValueReadExt;
|
||||||
|
|
||||||
let key = "store.implicit-create";
|
let key = "store.implicit-create";
|
||||||
|
|
||||||
if let Some(ref t) = *config {
|
if let Some(ref t) = *config {
|
||||||
|
|
Loading…
Reference in a new issue