We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60c1655 commit 3aea9e0Copy full SHA for 3aea9e0
src/file/format/gura.rs
@@ -2,6 +2,7 @@ use std::error::Error;
2
3
use gura::GuraType;
4
5
+use crate::format;
6
use crate::map::Map;
7
use crate::value::{Value, ValueKind};
8
@@ -10,11 +11,7 @@ pub fn parse(
10
11
text: &str,
12
) -> Result<Map<String, Value>, Box<dyn Error + Send + Sync>> {
13
let value = from_gura_value(uri, gura::parse(text).unwrap());
- match value.kind {
14
- ValueKind::Table(map) => Ok(map),
15
-
16
- _ => Ok(Map::new()),
17
- }
+ format::extract_root_table(uri, value)
18
}
19
20
fn from_gura_value(uri: Option<&String>, value: GuraType) -> Value {
0 commit comments