Skip to content

Commit

Permalink
Replace serde_qs to serde_html_form
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan committed Apr 22, 2024
1 parent 26b2bfd commit ff28c60
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
26 changes: 14 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ regex = "1"
serde = "1.0.160"
serde_bytes = "0.11.9"
serde_json = "1.0.96"
serde_qs = "0.12"
serde_html_form = "0.2.6"

# Networking
futures = { version = "0.3.30", default-features = false, features = ["alloc"] }
Expand Down
2 changes: 1 addition & 1 deletion atrium-xrpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ keywords.workspace = true
async-trait.workspace = true
http.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_html_form.workspace = true
serde_json.workspace = true
serde_qs.workspace = true
thiserror.workspace = true

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions atrium-xrpc/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ pub enum Error<E> {
HttpClient(Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("serde_json error: {0}")]
SerdeJson(#[from] serde_json::Error),
#[error("serde_qs error: {0}")]
SerdeQs(#[from] serde_qs::Error),
#[error("serde_html_form error: {0}")]
SerdeHtmlForm(#[from] serde_html_form::ser::Error),
#[error("unexpected response type")]
UnexpectedResponseType,
}
2 changes: 1 addition & 1 deletion atrium-xrpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub trait XrpcClient: HttpClient {
{
let mut uri = format!("{}/xrpc/{}", self.base_uri(), request.path);
if let Some(p) = &request.parameters {
serde_qs::to_string(p).map(|qs| {
serde_html_form::to_string(p).map(|qs| {
uri += "?";
uri += &qs;
})?;
Expand Down

0 comments on commit ff28c60

Please sign in to comment.