Skip to content

Commit

Permalink
Fixe double allocation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
glazec committed Aug 15, 2024
1 parent 67ab2ba commit c862b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/doc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl DocBuilder {
.display()
.to_string()
.trim_start_matches('/')
.to_string();
.to_owned();
let slash_count = readme_path.chars().filter(|&c| c == '/').count();
let prefix = "../".repeat(slash_count);
let readme_path = format!("{prefix}{readme_path}/index.html");
Expand Down

0 comments on commit c862b32

Please sign in to comment.