summaryrefslogtreecommitdiffstats
path: root/lib/entry/libimagentryref/src/flags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/entry/libimagentryref/src/flags.rs')
-rw-r--r--lib/entry/libimagentryref/src/flags.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/entry/libimagentryref/src/flags.rs b/lib/entry/libimagentryref/src/flags.rs
index 21d822dd..fd80368c 100644
--- a/lib/entry/libimagentryref/src/flags.rs
+++ b/lib/entry/libimagentryref/src/flags.rs
@@ -38,12 +38,8 @@ impl RefFlags {
/// It assumes that this is a Map with Key = <name of the setting> and Value = boolean.
pub fn read(v: &Value) -> Result<RefFlags> {
fn get_field(v: &Value, key: &str) -> Result<bool> {
- use toml_query::read::TomlValueReadExt;
-
- v.read(key)?
- .ok_or(RE::from_kind(REK::HeaderFieldMissingError))?
- .as_bool()
- .ok_or(REK::HeaderTypeError.into())
+ use toml_query::read::TomlValueReadTypeExt;
+ v.read_bool(key)?.ok_or(RE::from_kind(REK::HeaderFieldMissingError))
}
Ok(RefFlags {