Skip to content

Commit

Permalink
Fix index.html generation
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjunetime committed Dec 19, 2023
1 parent d900292 commit 162ad93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

15 changes: 3 additions & 12 deletions backend/src/robots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 162ad93

Please sign in to comment.