Avoided the redundant allocation.
Signed-off-by: FrankHB <frankhb1989@gmail.com>
This commit is contained in:
parent
65d9eb6f7e
commit
780fb979a0
|
@ -265,7 +265,7 @@ fn load_chapter<P: AsRef<Path>>(
|
|||
})?;
|
||||
|
||||
if content.as_bytes().starts_with(b"\xef\xbb\xbf") {
|
||||
content = content[3..].to_string()
|
||||
content.replace_range(..3, "");
|
||||
}
|
||||
|
||||
let stripped = location
|
||||
|
|
Loading…
Reference in New Issue