refactor(daedalus_client): replace serde-xml-rs with quick-xml (#7185)

quick-xml is already the de facto XML (de)serializer used
elsewhere in the workspace (labrinth, app-lib), so consolidate
on it here too. Its serde feature deserializes the existing
maven-metadata.xml structs without any changes. Drops one
redundant dependency from the workspace.
This commit is contained in:
exefer
2026-08-20 19:00:36 +00:00
committed by GitHub
parent 5eb64cea3e
commit 5d54cfa0dc
5 changed files with 4 additions and 17 deletions
+1 -1
View File
@@ -20,6 +20,7 @@ dotenvy = { workspace = true }
futures = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
itertools = { workspace = true }
quick-xml = { workspace = true }
reqwest = { workspace = true, features = [
"json",
"rustls-tls-native-roots",
@@ -28,7 +29,6 @@ reqwest = { workspace = true, features = [
rust-s3 = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde-xml-rs = { workspace = true }
sha1_smol = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync"] }
+1 -1
View File
@@ -11,7 +11,7 @@ pub enum ErrorKind {
#[error("Error while deserializing JSON: {0}")]
SerdeJSON(#[from] serde_json::Error),
#[error("Error while deserializing XML: {0}")]
SerdeXML(#[from] serde_xml_rs::Error),
QuickXML(#[from] quick_xml::DeError),
#[error(
"Failed to validate file checksum at url {url} with hash {hash} after {tries} tries"
)]
+1 -1
View File
@@ -304,7 +304,7 @@ pub async fn fetch_xml<T: DeserializeOwned>(
url: &str,
semaphore: &Arc<Semaphore>,
) -> Result<T, Error> {
Ok(serde_xml_rs::from_reader(
Ok(quick_xml::de::from_reader(
&*download_file(url, None, semaphore).await?,
)?)
}