Skip to content

Commit 7c611c2

Browse files
committed
fix single character string constant
1 parent 58c59ea commit 7c611c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/docs/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub fn generate_docs_html(root_file: PathBuf, build_dir: &Path) {
108108
exposed_module_docs
109109
.iter()
110110
.map(|(_, module)| {
111-
let module_href = module.name.replace(".", "/");
111+
let module_href = module.name.replace('.', "/");
112112
let href = module_href.as_str();
113113

114114
format!(r#"<link rel="prefetch" href="{href}"/>"#)
@@ -238,7 +238,7 @@ fn render_package_index(docs_by_module: &[(ModuleId, ModuleDocumentation)]) -> S
238238
push_html(
239239
&mut link_buf,
240240
"a",
241-
[("href", module.name.replace(".", "/").as_str())],
241+
[("href", module.name.replace('.', "/").as_str())],
242242
module.name.as_str(),
243243
);
244244

@@ -463,7 +463,7 @@ fn render_sidebar<'a, I: Iterator<Item = &'a ModuleDocumentation>>(modules: I) -
463463
let mut buf = String::new();
464464

465465
for module in modules {
466-
let module_href = module.name.replace(".", "/");
466+
let module_href = module.name.replace('.', "/");
467467
let href = module_href.as_str();
468468
let mut sidebar_entry_content = String::new();
469469
let mut module_link_content = String::new();
@@ -575,7 +575,7 @@ fn render_search_type_ahead<'a, I: Iterator<Item = &'a ModuleDocumentation>>(mod
575575

576576
let mut entry_href = String::new();
577577

578-
entry_href.push_str(&module_name.replace(".", "/"));
578+
entry_href.push_str(&module_name.replace('.', "/"));
579579
entry_href.push('#');
580580
entry_href.push_str(&doc_def.name);
581581

0 commit comments

Comments
 (0)