From be82af2a474b9c6ac85ec1e001af1704521820e6 Mon Sep 17 00:00:00 2001 From: David Orchard Date: Mon, 2 Aug 2021 23:17:08 -0700 Subject: Rename MapImpl to Map --- src/file/format/json.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/file/format/json.rs') diff --git a/src/file/format/json.rs b/src/file/format/json.rs index c4895fb..e3d8b87 100644 --- a/src/file/format/json.rs +++ b/src/file/format/json.rs @@ -1,19 +1,19 @@ use std::error::Error; -use crate::map::MapImpl; +use crate::map::Map; use crate::value::{Value, ValueKind}; pub fn parse( uri: Option<&String>, text: &str, -) -> Result, Box> { +) -> Result, Box> { // Parse a JSON object value from the text // TODO: Have a proper error fire if the root of a file is ever not a Table let value = from_json_value(uri, &serde_json::from_str(text)?); match value.kind { ValueKind::Table(map) => Ok(map), - _ => Ok(MapImpl::new()), + _ => Ok(Map::new()), } } @@ -34,7 +34,7 @@ fn from_json_value(uri: Option<&String>, value: &serde_json::Value) -> Value { serde_json::Value::Bool(value) => Value::new(uri, ValueKind::Boolean(value)), serde_json::Value::Object(ref table) => { - let mut m = MapImpl::new(); + let mut m = Map::new(); for (key, value) in table { m.insert(key.clone(), from_json_value(uri, value)); -- cgit v1.2.3