diff --git a/src/file/format/gura.rs b/src/file/format/gura.rs index 1ff0665c..9f146698 100644 --- a/src/file/format/gura.rs +++ b/src/file/format/gura.rs @@ -2,6 +2,7 @@ use std::error::Error; use gura::GuraType; +use crate::format; use crate::map::Map; use crate::value::{Value, ValueKind}; @@ -10,11 +11,7 @@ pub fn parse( text: &str, ) -> Result, Box> { let value = from_gura_value(uri, gura::parse(text).unwrap()); - match value.kind { - ValueKind::Table(map) => Ok(map), - - _ => Ok(Map::new()), - } + format::extract_root_table(uri, value) } fn from_gura_value(uri: Option<&String>, value: GuraType) -> Value {