From 77409389ac466d184b61e6db25df594731291c96 Mon Sep 17 00:00:00 2001 From: "D. Scott Boggs" Date: Wed, 1 Feb 2023 06:14:48 -0500 Subject: [PATCH] Drop dependency on serde_qs for now --- Cargo.toml | 1 - src/errors.rs | 4 ---- src/requests/statuses.rs | 3 +-- 3 files changed, 1 insertion(+), 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 { - Ok(format!("?{}", serde_qs::to_string(&self)?)) + Ok(format!("?{}", serde_urlencoded::to_string(self)?)) } }