summaryrefslogtreecommitdiffstats
path: root/src/file/format/ron.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/file/format/ron.rs')
-rw-r--r--src/file/format/ron.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/file/format/ron.rs b/src/file/format/ron.rs
index fb2b063..9ac81a9 100644
--- a/src/file/format/ron.rs
+++ b/src/file/format/ron.rs
@@ -1,5 +1,6 @@
use std::error::Error;
+use crate::format;
use crate::map::Map;
use crate::value::{Value, ValueKind};
@@ -8,11 +9,7 @@ pub fn parse(
text: &str,
) -> Result<Map<String, Value>, Box<dyn Error + Send + Sync>> {
let value = from_ron_value(uri, ron::from_str(text)?)?;
- match value.kind {
- ValueKind::Table(map) => Ok(map),
-
- _ => Ok(Map::new()),
- }
+ format::extract_root_table(uri, value)
}
fn from_ron_value(