We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 52ca603 + ab3ab4d commit f6cef57Copy full SHA for f6cef57
src/librustdoc/markdown.rs
@@ -1,3 +1,4 @@
1
+use std::fmt::Write as _;
2
use std::fs::{create_dir_all, read_to_string, File};
3
use std::io::prelude::*;
4
use std::path::Path;
@@ -51,8 +52,8 @@ crate fn render<P: AsRef<Path>>(
51
52
53
let mut css = String::new();
54
for name in &options.markdown_css {
- let s = format!("<link rel=\"stylesheet\" type=\"text/css\" href=\"{name}\">\n");
55
- css.push_str(&s)
+ write!(css, r#"<link rel="stylesheet" type="text/css" href="{name}">"#)
56
+ .expect("Writing to a String can't fail");
57
}
58
59
let input_str = read_to_string(input).map_err(|err| format!("{}: {}", input.display(), err))?;
0 commit comments