From 3366f319439b9ad2afa406da459253dfbd56a89c Mon Sep 17 00:00:00 2001 From: viridian Date: Thu, 2 May 2024 17:04:49 +0200 Subject: [PATCH] Atom feeds can have non ascii chars in them --- src/syndication/atom.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/syndication/atom.rs b/src/syndication/atom.rs index 2e63218..22bd713 100644 --- a/src/syndication/atom.rs +++ b/src/syndication/atom.rs @@ -81,13 +81,10 @@ pub fn generate( let mut writer: Vec = Vec::new(); xml.generate(&mut writer).unwrap(); - let mut output_xml = String::new(); - for e in writer { - output_xml += &e.as_ascii().unwrap().to_string(); - } - output_xml + + String::from_utf8(writer).unwrap() } fn last_update(post_index: &Vec) -> i64 {