Compare commits

...

2 Commits

Author SHA1 Message Date
Greg Johnston
2742d7dfb1 Merge branch 'main' into serde-qs-1.0 2026-01-02 14:07:54 -05:00
Greg Johnston
d0ba6e7eda change: migrate to serde_qs 1.0 2025-08-21 20:08:38 -04:00
4 changed files with 30 additions and 21 deletions

16
Cargo.lock generated
View File

@@ -1316,7 +1316,7 @@ dependencies = [
"gobject-sys",
"libc",
"system-deps",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -1672,7 +1672,7 @@ dependencies = [
"libc",
"percent-encoding",
"pin-project-lite",
"socket2 0.6.1",
"socket2 0.6.0",
"tokio",
"tower-service",
"tracing",
@@ -2810,7 +2810,7 @@ dependencies = [
"once_cell",
"socket2 0.6.1",
"tracing",
"windows-sys 0.60.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -3367,11 +3367,13 @@ dependencies = [
[[package]]
name = "serde_qs"
version = "0.15.0"
version = "1.0.0-rc.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352"
checksum = "4cb0b9062a400c31442e67d1f2b1e7746bebd691110ebee1b7d0c7293b04fab1"
dependencies = [
"itoa",
"percent-encoding",
"ryu",
"serde",
"thiserror 2.0.17",
]
@@ -3820,7 +3822,7 @@ dependencies = [
"getrandom 0.3.4",
"once_cell",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -4565,7 +4567,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]

View File

@@ -103,12 +103,12 @@ base64 = { default-features = false, version = "0.22.1" }
cfg-if = { default-features = false, version = "1.0.4" }
wasm-bindgen-futures = { default-features = false, version = "0.4.56" }
tower = { default-features = false, version = "0.5.2" }
proc-macro2 = { default-features = false, version = "1.0.104" }
serde = { default-features = false, version = "1.0.228" }
parking_lot = { default-features = false, version = "0.12.5" }
axum = { default-features = false, version = "0.8.8" }
serde_qs = { default-features = false, version = "0.15.0" }
syn = { default-features = false, version = "2.0.111" }
proc-macro2 = { default-features = false, version = "1.0.96" }
serde = { default-features = false, version = "1.0.219" }
parking_lot = { default-features = false, version = "0.12.4" }
axum = { default-features = false, version = "0.8.4" }
serde_qs = { default-features = false, version = "1.0.0-rc.3" }
syn = { default-features = false, version = "2.0.104" }
xxhash-rust = { default-features = false, version = "0.8.15" }
paste = { default-features = false, version = "1.0.15" }
quote = { default-features = false, version = "1.0.42" }

View File

@@ -287,7 +287,9 @@ where
web_sys::UrlSearchParams::new_with_str_sequence_sequence(form_data)
.unwrap_throw();
let data = data.to_string().as_string().unwrap_or_default();
serde_qs::Config::new(5, false).deserialize_str::<Self>(&data)
serde_qs::Config::new()
.use_form_encoding(true)
.deserialize_str::<Self>(&data)
}
}

View File

@@ -58,7 +58,8 @@ where
{
async fn from_req(req: Request) -> Result<Self, E> {
let string_data = req.as_query().unwrap_or_default();
let args = serde_qs::Config::new(5, false)
let args = serde_qs::Config::new()
.use_form_encoding(true)
.deserialize_str::<Self>(string_data)
.map_err(|e| {
ServerFnErrorErr::Args(e.to_string()).into_app_error()
@@ -97,7 +98,8 @@ where
{
async fn from_req(req: Request) -> Result<Self, E> {
let string_data = req.try_into_string().await?;
let args = serde_qs::Config::new(5, false)
let args = serde_qs::Config::new()
.use_form_encoding(true)
.deserialize_str::<Self>(&string_data)
.map_err(|e| {
ServerFnErrorErr::Args(e.to_string()).into_app_error()
@@ -136,7 +138,8 @@ where
{
async fn from_req(req: Request) -> Result<Self, E> {
let string_data = req.as_query().unwrap_or_default();
let args = serde_qs::Config::new(5, false)
let args = serde_qs::Config::new()
.use_form_encoding(true)
.deserialize_str::<Self>(string_data)
.map_err(|e| {
ServerFnErrorErr::Args(e.to_string()).into_app_error()
@@ -175,8 +178,9 @@ where
{
async fn from_req(req: Request) -> Result<Self, E> {
let string_data = req.try_into_string().await?;
let args = serde_qs::Config::new(5, false)
.deserialize_str::<Self>(&string_data)
let args = serde_qs::Config::new()
.use_form_encoding(true)
.deserialize_str::<Self>(string_data)
.map_err(|e| {
ServerFnErrorErr::Args(e.to_string()).into_app_error()
})?;
@@ -214,8 +218,9 @@ where
{
async fn from_req(req: Request) -> Result<Self, E> {
let string_data = req.try_into_string().await?;
let args = serde_qs::Config::new(5, false)
.deserialize_str::<Self>(&string_data)
let args = serde_qs::Config::new()
.use_form_encoding(true)
.deserialize_str::<Self>(string_data)
.map_err(|e| {
ServerFnErrorErr::Args(e.to_string()).into_app_error()
})?;