diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-01-01 20:07:03 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-01-01 20:07:03 +0100 |
commit | ad3874f8bf5b5451e910ceae02518c04695e63c6 (patch) | |
tree | 7bda5499c4894dea763c3077383721131e55d993 /src/error.rs | |
parent | af92ce5991aee0f6bd9ae6f84f9c668d5407ba09 (diff) | |
download | rust-zotapi-ad3874f8bf5b5451e910ceae02518c04695e63c6.tar.gz rust-zotapi-ad3874f8bf5b5451e910ceae02518c04695e63c6.tar.bz2 rust-zotapi-ad3874f8bf5b5451e910ceae02518c04695e63c6.zip |
Replace serde_urlencoded with serde_qs.
Simplifies serialization of various types quite a bit.
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index d4f6b96..1e349d9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -21,6 +21,7 @@ use std; pub enum Error { Http(reqwest::Error), Io(std::io::Error), + Qs(serde_qs::Error), Unauthorized, Unknown, } @@ -36,3 +37,9 @@ impl From<std::io::Error> for Error { Error::Io(e) } } + +impl From<serde_qs::Error> for Error { + fn from(e: serde_qs::Error) -> Error { + Error::Qs(e) + } +} |