diff options
Diffstat (limited to 'src/file')
-rw-r--r-- | src/file/format/hjson.rs | 6 | ||||
-rw-r--r-- | src/file/format/ini.rs | 6 | ||||
-rw-r--r-- | src/file/format/json.rs | 6 | ||||
-rw-r--r-- | src/file/format/mod.rs | 3 | ||||
-rw-r--r-- | src/file/format/toml.rs | 4 | ||||
-rw-r--r-- | src/file/format/yaml.rs | 4 | ||||
-rw-r--r-- | src/file/mod.rs | 7 | ||||
-rw-r--r-- | src/file/source/file.rs | 7 | ||||
-rw-r--r-- | src/file/source/mod.rs | 2 | ||||
-rw-r--r-- | src/file/source/string.rs | 3 |
10 files changed, 30 insertions, 18 deletions
diff --git a/src/file/format/hjson.rs b/src/file/format/hjson.rs index 41631ea..8a1e474 100644 --- a/src/file/format/hjson.rs +++ b/src/file/format/hjson.rs @@ -1,7 +1,9 @@ -use serde_hjson; use std::collections::HashMap; use std::error::Error; -use value::{Value, ValueKind}; + +use serde_hjson; + +use crate::value::{Value, ValueKind}; pub fn parse( uri: Option<&String>, diff --git a/src/file/format/ini.rs b/src/file/format/ini.rs index 0deefb5..b45695a 100644 --- a/src/file/format/ini.rs +++ b/src/file/format/ini.rs @@ -1,7 +1,9 @@ -use ini::Ini; use std::collections::HashMap; use std::error::Error; -use value::{Value, ValueKind}; + +use ini::Ini; + +use crate::value::{Value, ValueKind}; pub fn parse( uri: Option<&String>, diff --git a/src/file/format/json.rs b/src/file/format/json.rs index 6a05051..568a16b 100644 --- a/src/file/format/json.rs +++ b/src/file/format/json.rs @@ -1,7 +1,9 @@ -use serde_json; use std::collections::HashMap; use std::error::Error; -use value::{Value, ValueKind}; + +use serde_json; + +use crate::value::{Value, ValueKind}; pub fn parse( uri: Option<&String>, diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs index c6367c4..0ceeaf4 100644 --- a/src/file/format/mod.rs +++ b/src/file/format/mod.rs @@ -4,7 +4,8 @@ use std::collections::HashMap; use std::error::Error; -use value::Value; + +use crate::value::Value; #[cfg(feature = "toml")] mod toml; diff --git a/src/file/format/toml.rs b/src/file/format/toml.rs index 409f73f..c5b7a7d 100644 --- a/src/file/format/toml.rs +++ b/src/file/format/toml.rs @@ -1,7 +1,9 @@ use std::collections::HashMap; use std::error::Error; + use toml; -use value::{Value, ValueKind}; + +use crate::value::{Value, ValueKind}; pub fn parse( uri: Option<&String>, diff --git a/src/file/format/yaml.rs b/src/file/format/yaml.rs index 18716f6..2526395 100644 --- a/src/file/format/yaml.rs +++ b/src/file/format/yaml.rs @@ -2,9 +2,11 @@ use std::collections::HashMap; use std::error::Error; use std::fmt; use std::mem; -use value::{Value, ValueKind}; + use yaml_rust as yaml; +use crate::value::{Value, ValueKind}; + pub fn parse( uri: Option<&String>, text: &str, diff --git a/src/file/mod.rs b/src/file/mod.rs index 73dfad4..b00a271 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -1,11 +1,12 @@ mod format; pub mod source; -use error::*; -use source::Source; use std::collections::HashMap; use std::path::{Path, PathBuf}; -use value::Value; + +use crate::error::*; +use crate::source::Source; +use crate::value::Value; pub use self::format::FileFormat; use self::source::FileSource; diff --git a/src/file/source/file.rs b/src/file/source/file.rs index 12805fd..75634dd 100644 --- a/src/file/source/file.rs +++ b/src/file/source/file.rs @@ -1,13 +1,12 @@ -use std::error::Error; - -use file::format::ALL_EXTENSIONS; use std::env; +use std::error::Error; use std::fs; use std::io::{self, Read}; use std::iter::Iterator; use std::path::{Path, PathBuf}; -use super::{FileFormat, FileSource}; +use crate::file::format::ALL_EXTENSIONS; +use crate::file::{FileFormat, FileSource}; /// Describes a file sourced from a file #[derive(Clone, Debug)] diff --git a/src/file/source/mod.rs b/src/file/source/mod.rs index 7d8e6a5..3b42a55 100644 --- a/src/file/source/mod.rs +++ b/src/file/source/mod.rs @@ -4,7 +4,7 @@ pub mod string; use std::error::Error; use std::fmt::Debug; -use super::FileFormat; +use crate::file::FileFormat; /// Describes where the file is sourced pub trait FileSource: Debug + Clone { diff --git a/src/file/source/string.rs b/src/file/source/string.rs index cd2089d..2fede45 100644 --- a/src/file/source/string.rs +++ b/src/file/source/string.rs @@ -1,6 +1,7 @@ -use super::{FileFormat, FileSource}; use std::error::Error; +use crate::file::{FileFormat, FileSource}; + /// Describes a file sourced from a string #[derive(Clone, Debug)] pub struct FileSourceString(String); |