mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 14:52:37 +00:00
Avoided the redundant allocation.
Signed-off-by: FrankHB <frankhb1989@gmail.com>
This commit is contained in:
parent
65d9eb6f7e
commit
780fb979a0
1 changed files with 1 additions and 1 deletions
|
@ -265,7 +265,7 @@ fn load_chapter<P: AsRef<Path>>(
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if content.as_bytes().starts_with(b"\xef\xbb\xbf") {
|
if content.as_bytes().starts_with(b"\xef\xbb\xbf") {
|
||||||
content = content[3..].to_string()
|
content.replace_range(..3, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
let stripped = location
|
let stripped = location
|
||||||
|
|
Loading…
Reference in a new issue