diff options
author | Ryan Leckey <leckey.ryan@gmail.com> | 2018-07-02 15:33:38 -0700 |
---|---|---|
committer | Ryan Leckey <leckey.ryan@gmail.com> | 2018-07-02 15:33:38 -0700 |
commit | cbb9ef88ea6f6452614dd8bbffce7203b1358a55 (patch) | |
tree | fd4f67587f9a36c517a3a3f1ff7ef727697d5fef /src/file/mod.rs | |
parent | bbc78d85610dec79aa4af4dd360131c7880efb5f (diff) |
Run rustfmt (nightly)
Diffstat (limited to 'src/file/mod.rs')
-rw-r--r-- | src/file/mod.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/file/mod.rs b/src/file/mod.rs index 6586ede..fe4f5b4 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -1,14 +1,14 @@ mod format; pub mod source; -use source::Source; use error::*; -use value::Value; +use source::Source; use std::collections::HashMap; use std::path::{Path, PathBuf}; +use value::Value; -use self::source::FileSource; pub use self::format::FileFormat; +use self::source::FileSource; #[derive(Clone, Debug)] pub struct File<T> @@ -97,7 +97,8 @@ where fn collect(&self) -> Result<HashMap<String, Value>> { // Coerce the file contents to a string - let (uri, contents, format) = match self.source + let (uri, contents, format) = match self + .source .resolve(self.format) .map_err(|err| ConfigError::Foreign(err)) { @@ -113,11 +114,11 @@ where }; // Parse the string using the given format - format.parse(uri.as_ref(), &contents).map_err(|cause| { - ConfigError::FileParse { + format + .parse(uri.as_ref(), &contents) + .map_err(|cause| ConfigError::FileParse { uri: uri, cause: cause, - } - }) + }) } } |