Make the favicon real

This commit is contained in:
Richard Feldman 2023-09-29 15:47:34 -04:00
parent fee7a6d6ae
commit 9573cf827c
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
2 changed files with 0 additions and 6 deletions

View file

@ -43,7 +43,6 @@ pub fn generate_docs_html(root_file: PathBuf) {
struct Assets<S: AsRef<str>> {
search_js: S,
styles_css: S,
favicon_svg: S,
raw_template_html: S,
}
@ -51,13 +50,11 @@ pub fn generate_docs_html(root_file: PathBuf) {
let assets = {
let search_js = include_str!("./static/search.js");
let styles_css = include_str!("./static/styles.css");
let favicon_svg = include_str!("./static/favicon.svg");
let raw_template_html = include_str!("./static/index.html");
Assets {
search_js,
styles_css,
favicon_svg,
raw_template_html,
}
};
@ -71,13 +68,11 @@ pub fn generate_docs_html(root_file: PathBuf) {
// Read the assets from the filesystem
let search_js = fs::read_to_string(static_dir.join("search.js")).unwrap();
let styles_css = fs::read_to_string(static_dir.join("styles.css")).unwrap();
let favicon_svg = fs::read_to_string(static_dir.join("favicon.svg")).unwrap();
let raw_template_html = fs::read_to_string(static_dir.join("index.html")).unwrap();
Assets {
search_js,
styles_css,
favicon_svg,
raw_template_html,
}
};
@ -87,7 +82,6 @@ pub fn generate_docs_html(root_file: PathBuf) {
for (file, contents) in [
("search.js", assets.search_js),
("styles.css", assets.styles_css),
("favicon.svg", assets.favicon_svg),
] {
let dir = build_dir.join(file);
fs::write(&dir, contents).unwrap_or_else(|error| {