Drop dependency on serde_qs for now

This commit is contained in:
D. Scott Boggs 2023-02-01 06:14:48 -05:00 committed by Scott Boggs
parent 6b2cb17d9a
commit 77409389ac
3 changed files with 1 additions and 7 deletions

View File

@ -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"

View File

@ -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.
///

View File

@ -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)?))
}
}