From cbb9ef88ea6f6452614dd8bbffce7203b1358a55 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Mon, 2 Jul 2018 15:33:38 -0700 Subject: Run rustfmt (nightly) --- src/file/mod.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/file/mod.rs') 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 @@ -97,7 +97,8 @@ where fn collect(&self) -> Result> { // 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, - } - }) + }) } } -- cgit v1.2.3