diff options
author | Alex Crichton <alex@alexcrichton.com> | 2014-09-21 07:55:13 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2014-09-21 07:55:19 -0700 |
commit | 22ad6e7ea9f2a81aac3ba9e427dd8a1036453486 (patch) | |
tree | f8d213dd276f416aa44394a3439530cfd5e19332 /src/lib.rs | |
parent | 1ca52c5ea44d37354af024f1c790c2f042504c5b (diff) | |
download | milf-rs-22ad6e7ea9f2a81aac3ba9e427dd8a1036453486.tar.gz milf-rs-22ad6e7ea9f2a81aac3ba9e427dd8a1036453486.zip |
Update to rust master
Closes #19
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -46,6 +46,7 @@ extern crate serialize; use std::collections::TreeMap; use std::from_str::FromStr; +use std::string; pub use parser::{Parser,ParserError}; pub use serialization::{Encoder, encode, encode_str}; @@ -61,17 +62,17 @@ mod serialization; #[deriving(PartialEq, Clone)] #[allow(missing_doc)] pub enum Value { - String(String), + String(string::String), Integer(i64), Float(f64), Boolean(bool), - Datetime(String), - Array(Array), - Table(Table), + Datetime(string::String), + Array(TomlArray), + Table(TomlTable), } -pub type Array = Vec<Value>; -pub type Table = TreeMap<String, Value>; +pub type TomlArray = Vec<Value>; +pub type TomlTable = TreeMap<string::String, Value>; impl Value { /// Tests whether this and another value have the same type. @@ -140,7 +141,7 @@ impl Value { } /// Extracts the table value if it is a table. - pub fn as_table<'a>(&'a self) -> Option<&'a Table> { + pub fn as_table<'a>(&'a self) -> Option<&'a TomlTable> { match *self { Table(ref s) => Some(s), _ => None } } |