summaryrefslogtreecommitdiffstats
path: root/src/file/source
diff options
context:
space:
mode:
authorJascha <Jascha-N@users.noreply.github.com>2017-06-23 14:12:47 +0200
committerJascha <Jascha-N@users.noreply.github.com>2017-06-23 14:12:47 +0200
commit6c1d3807560dd2d177096118f8cce03933511685 (patch)
treecadd5bdf6f9aaa4397b9310f0de1e84782c6abc9 /src/file/source
parentf4fad94a58c2eef5e1e49b4f2b150eac0efbd360 (diff)
Make boxed errors Send + Sync
Diffstat (limited to 'src/file/source')
-rw-r--r--src/file/source/file.rs4
-rw-r--r--src/file/source/mod.rs2
-rw-r--r--src/file/source/string.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/file/source/file.rs b/src/file/source/file.rs
index 790933f..7bf29be 100644
--- a/src/file/source/file.rs
+++ b/src/file/source/file.rs
@@ -26,7 +26,7 @@ impl FileSourceFile {
fn find_file(&self,
format_hint: Option<FileFormat>)
- -> Result<(PathBuf, FileFormat), Box<Error>> {
+ -> Result<(PathBuf, FileFormat), Box<Error + Send + Sync>> {
// First check for an _exact_ match
let mut filename = env::current_dir()?.as_path().join(self.name.clone());
if filename.is_file() {
@@ -83,7 +83,7 @@ impl FileSourceFile {
impl FileSource for FileSourceFile {
fn resolve(&self,
format_hint: Option<FileFormat>)
- -> Result<(Option<String>, String, FileFormat), Box<Error>> {
+ -> Result<(Option<String>, String, FileFormat), Box<Error + Send + Sync>> {
// Find file
let (filename, format) = self.find_file(format_hint)?;
diff --git a/src/file/source/mod.rs b/src/file/source/mod.rs
index 67e2cf1..f164d27 100644
--- a/src/file/source/mod.rs
+++ b/src/file/source/mod.rs
@@ -11,5 +11,5 @@ use super::FileFormat;
pub trait FileSource: Debug + Clone {
fn resolve(&self,
format_hint: Option<FileFormat>)
- -> Result<(Option<String>, String, FileFormat), Box<Error>>;
+ -> Result<(Option<String>, String, FileFormat), Box<Error + Send + Sync>>;
}
diff --git a/src/file/source/string.rs b/src/file/source/string.rs
index 70101d6..5dbd1b9 100644
--- a/src/file/source/string.rs
+++ b/src/file/source/string.rs
@@ -18,7 +18,7 @@ impl<'a> From<&'a str> for FileSourceString {
impl FileSource for FileSourceString {
fn resolve(&self,
format_hint: Option<FileFormat>)
- -> Result<(Option<String>, String, FileFormat), Box<Error>> {
+ -> Result<(Option<String>, String, FileFormat), Box<Error + Send + Sync>> {
Ok((None, self.0.clone(), format_hint.expect("from_str requires a set file format")))
}
}