summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorD. Scott Boggs <scott@tams.tech>2023-02-01 06:14:48 -0500
committerD. Scott Boggs <scott@tams.tech>2023-02-01 07:06:55 -0500
commitb459ca99aa27b1d6da022b1a9fbd8cf488c46569 (patch)
treea2447050b959ac6886340f529839288db0bc2be4
parent6b2cb17d9aaba0fdd1ee40dbf843d5cd62568137 (diff)
Drop dependency on serde_qs for nowdrop-dependency/serde_qs
-rw-r--r--Cargo.toml1
-rw-r--r--src/errors.rs4
-rw-r--r--src/requests/statuses.rs3
3 files changed, 1 insertions, 7 deletions
diff --git a/Cargo.toml b/Cargo.toml
index cc682b9..2242a70 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -36,7 +36,6 @@ version = "1.0.3"
futures = "0.3.25"
doc-comment = "0.3"
serde_json = "1"
-serde_qs = "0.10.1"
serde_urlencoded = "0.7.1"
tap-reader = "1"
url = "2"
diff --git a/src/errors.rs b/src/errors.rs
index 1459d71..563555f 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -5,7 +5,6 @@ use envy::Error as EnvyError;
use reqwest::{header::ToStrError as HeaderStrError, Error as HttpError, StatusCode};
use serde::Deserialize;
use serde_json::Error as SerdeError;
-use serde_qs::Error as SerdeQsError;
use serde_urlencoded::ser::Error as UrlEncodedError;
#[cfg(feature = "toml")]
use tomlcrate::de::Error as TomlDeError;
@@ -89,9 +88,6 @@ pub enum Error {
/// Error deserializing config from the environment
#[error("Error deserializing config from the environment")]
Envy(#[from] EnvyError),
- /// Error serializing to a query string
- #[error("Error serializing to a query string")]
- SerdeQs(#[from] SerdeQsError),
/// An integer conversion was attempted, but the value didn't fit into the
/// target type.
///
diff --git a/src/requests/statuses.rs b/src/requests/statuses.rs
index 334a7b7..f44ff5f 100644
--- a/src/requests/statuses.rs
+++ b/src/requests/statuses.rs
@@ -1,6 +1,5 @@
use crate::errors::Error;
use serde::Serialize;
-use serde_qs;
use std::{borrow::Cow, convert::Into};
mod bool_qs_serialize {
@@ -206,7 +205,7 @@ impl<'a> StatusesRequest<'a> {
/// Serialize into a query string
pub fn to_query_string(&self) -> Result<String, Error> {
- Ok(format!("?{}", serde_qs::to_string(&self)?))
+ Ok(format!("?{}", serde_urlencoded::to_string(self)?))
}
}