Skip to content

Commit

Permalink
fix: gracefully handle failure to write mermaid.js files
Browse files Browse the repository at this point in the history
  • Loading branch information
mersinvald committed Feb 2, 2023
1 parent 0b5a58e commit 514c67c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ fn generate_diagram_rustdoc<'a>(parts: impl Iterator<Item = &'a str>) -> TokenSt

let body = preamble.chain(parts).chain(postamble).join("\n");

place_mermaid_js().unwrap();
place_mermaid_js().unwrap_or_else(|e| {
eprintln!("failed to place mermaid.js on the filesystem: {}", e);
});

quote! {
#[doc = #mermaid_js_load_fallback1]
Expand Down

0 comments on commit 514c67c

Please sign in to comment.