summaryrefslogtreecommitdiffstats
path: root/src/value.rs
diff options
context:
space:
mode:
authorDavid Orchard <if_coding@fastmail.com>2021-08-02 23:17:08 -0700
committerDavid Orchard <if_coding@fastmail.com>2021-08-15 10:34:05 -0700
commitbe82af2a474b9c6ac85ec1e001af1704521820e6 (patch)
treeb065f9a4adaddfad570b370937e8081cd6fa70ed /src/value.rs
parent0e0ae2b359b5c943055c988c3c78f36db2503468 (diff)
Rename MapImpl to Map
Diffstat (limited to 'src/value.rs')
-rw-r--r--src/value.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/value.rs b/src/value.rs
index 17be54d..1523c1e 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -4,7 +4,7 @@ use std::fmt::Display;
use serde::de::{Deserialize, Deserializer, Visitor};
use crate::error::*;
-use crate::map::MapImpl;
+use crate::map::Map;
/// Underlying kind of the configuration value.
///
@@ -23,7 +23,7 @@ pub enum ValueKind {
}
pub type Array = Vec<Value>;
-pub type Table = MapImpl<String, Value>;
+pub type Table = Map<String, Value>;
impl Default for ValueKind {
fn default() -> Self {
@@ -73,11 +73,11 @@ impl From<bool> for ValueKind {
}
}
-impl<T> From<MapImpl<String, T>> for ValueKind
+impl<T> From<Map<String, T>> for ValueKind
where
T: Into<Value>,
{
- fn from(values: MapImpl<String, T>) -> Self {
+ fn from(values: Map<String, T>) -> Self {
let t = values.into_iter().map(|(k, v)| (k, v.into())).collect();
ValueKind::Table(t)
}
@@ -357,7 +357,7 @@ impl Value {
/// If the `Value` is a Table, returns the associated Map.
// FIXME: Should this not be `try_into_*` ?
- pub fn into_table(self) -> Result<MapImpl<String, Value>> {
+ pub fn into_table(self) -> Result<Map<String, Value>> {
match self.kind {
ValueKind::Table(value) => Ok(value),