diff --git a/Cargo.lock b/Cargo.lock index f49131e..ec3a755 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2312,9 +2312,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" diff --git a/backend/src/robots.rs b/backend/src/robots.rs index 7c9104b..599d8e6 100644 --- a/backend/src/robots.rs +++ b/backend/src/robots.rs @@ -125,18 +125,9 @@ pub async fn update_rss_xml( namespaces: BTreeMap::new() }; - let mut xml_vec = Vec::new(); - match channel.write_to(&mut *xml_vec) { - Ok(_) => { - let mut rss_xml = RSS_XML.write().await; - *rss_xml = String::from_utf8(xml_vec).unwrap(); - Ok(()) - }, - Err(e) => { - eprintln!("Couldn't write to vec: {e}"); - Err("Couldn't write to vec".into()) - } - } + let mut rss_xml = RSS_XML.write().await; + *rss_xml = channel.to_string(); + Ok(()) } pub async fn get_rss_xml(