aboutsummaryrefslogtreecommitdiffstats
path: root/src/json.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.rs')
-rw-r--r--src/json.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/json.rs b/src/json.rs
index d6c5328..ce95262 100644
--- a/src/json.rs
+++ b/src/json.rs
@@ -8,7 +8,7 @@ impl DeserializeJsonWithPath for String {
fn json_with_path<T: serde::de::DeserializeOwned>(self) -> Result<T> {
let jd = &mut serde_json::Deserializer::from_str(&self);
serde_path_to_error::deserialize(jd)
- .map_err(|source| Error::JSON { source })
+ .map_err(|source| Error::Json { source })
}
}
@@ -18,7 +18,7 @@ impl DeserializeJsonWithPath for reqwest::blocking::Response {
self.bytes().map_err(|source| Error::Reqwest { source })?;
let jd = &mut serde_json::Deserializer::from_slice(&bytes);
serde_path_to_error::deserialize(jd)
- .map_err(|source| Error::JSON { source })
+ .map_err(|source| Error::Json { source })
}
}
@@ -40,6 +40,6 @@ impl DeserializeJsonWithPathAsync for reqwest::Response {
.map_err(|source| Error::Reqwest { source })?;
let jd = &mut serde_json::Deserializer::from_slice(&bytes);
serde_path_to_error::deserialize(jd)
- .map_err(|source| Error::JSON { source })
+ .map_err(|source| Error::Json { source })
}
}