diff options
Diffstat (limited to 'src/file/format')
-rw-r--r-- | src/file/format/json.rs | 2 | ||||
-rw-r--r-- | src/file/format/mod.rs | 2 | ||||
-rw-r--r-- | src/file/format/toml.rs | 2 | ||||
-rw-r--r-- | src/file/format/yaml.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/file/format/json.rs b/src/file/format/json.rs index ed6c787..ead99f8 100644 --- a/src/file/format/json.rs +++ b/src/file/format/json.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use std::error::Error; use value::{Value, ValueKind}; -pub fn parse(uri: Option<&String>, text: &str) -> Result<HashMap<String, Value>, Box<Error>> { +pub fn parse(uri: Option<&String>, text: &str) -> Result<HashMap<String, Value>, Box<Error + Send + Sync>> { // Parse a JSON object value from the text // TODO: Have a proper error fire if the root of a file is ever not a Table let value = from_json_value(uri, &serde_json::from_str(text)?); diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs index b3cf279..5aa1acb 100644 --- a/src/file/format/mod.rs +++ b/src/file/format/mod.rs @@ -66,7 +66,7 @@ impl FileFormat { pub fn parse(&self, uri: Option<&String>, text: &str) - -> Result<HashMap<String, Value>, Box<Error>> { + -> Result<HashMap<String, Value>, Box<Error + Send + Sync>> { match *self { #[cfg(feature = "toml")] FileFormat::Toml => toml::parse(uri, text), diff --git a/src/file/format/toml.rs b/src/file/format/toml.rs index cecad75..4307e48 100644 --- a/src/file/format/toml.rs +++ b/src/file/format/toml.rs @@ -4,7 +4,7 @@ use std::collections::{HashMap, BTreeMap}; use std::error::Error; use value::{Value, ValueKind}; -pub fn parse(uri: Option<&String>, text: &str) -> Result<HashMap<String, Value>, Box<Error>> { +pub fn parse(uri: Option<&String>, text: &str) -> Result<HashMap<String, Value>, Box<Error + Send + Sync>> { // Parse a TOML value from the provided text // TODO: Have a proper error fire if the root of a file is ever not a Table let value = from_toml_value(uri, &toml::from_str(text)?); diff --git a/src/file/format/yaml.rs b/src/file/format/yaml.rs index 4040ea6..3ed1356 100644 --- a/src/file/format/yaml.rs +++ b/src/file/format/yaml.rs @@ -6,7 +6,7 @@ use std::collections::{BTreeMap, HashMap}; use std::mem; use value::{Value, ValueKind}; -pub fn parse(uri: Option<&String>, text: &str) -> Result<HashMap<String, Value>, Box<Error>> { +pub fn parse(uri: Option<&String>, text: &str) -> Result<HashMap<String, Value>, Box<Error + Send + Sync>> { // Parse a YAML object from file let mut docs = yaml::YamlLoader::load_from_str(text)?; let root = match docs.len() { |