summaryrefslogtreecommitdiffstats
path: root/src/value.rs
diff options
context:
space:
mode:
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 e0cc885..efd9ebe 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -3,7 +3,7 @@ use std::fmt::Display;
use serde::de::{Deserialize, Deserializer, Visitor};
-use crate::map::MapImpl;
+use crate::map::Map;
use crate::error::*;
/// 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),