From e29748b255ce97dfe9b4efcfbc4d9bcb3d694b97 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sun, 12 Feb 2017 11:04:30 -0800 Subject: Decorate Box with Send + Sync --- src/file/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/file/mod.rs') diff --git a/src/file/mod.rs b/src/file/mod.rs index 6c72c37..7f7c0fb 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -47,7 +47,7 @@ impl FileFormat { } #[allow(unused_variables)] - fn parse(&self, text: &str, namespace: Option<&String>) -> Result, Box> { + fn parse(&self, text: &str, namespace: Option<&String>) -> Result, Box> { match *self { #[cfg(feature = "toml")] FileFormat::Toml => toml::Content::parse(text, namespace), @@ -65,7 +65,7 @@ pub trait FileSource { fn try_build(&self, format: FileFormat, namespace: Option<&String>) - -> Result, Box>; + -> Result, Box>; } pub struct FileSourceString(String); @@ -74,7 +74,7 @@ impl FileSource for FileSourceString { fn try_build(&self, format: FileFormat, namespace: Option<&String>) - -> Result, Box> { + -> Result, Box> { format.parse(&self.0, namespace) } } @@ -132,7 +132,7 @@ impl FileSource for FileSourceFile { fn try_build(&self, format: FileFormat, namespace: Option<&String>) - -> Result, Box> { + -> Result, Box> { // Find file let filename = self.find_file(format)?; @@ -195,7 +195,7 @@ impl File { } // Build normally and return error on failure - fn try_build(&self) -> Result, Box> { + fn try_build(&self) -> Result, Box> { self.source.try_build(self.format, self.namespace.as_ref()) } } @@ -209,7 +209,7 @@ impl File { impl SourceBuilder for File { // Use try_build but only pass an error through if this source // is required - fn build(&self) -> Result, Box> { + fn build(&self) -> Result, Box> { if self.required { self.try_build() } else { -- cgit v1.2.3