mirror of
https://github.com/danbulant/robotparser-rs
synced 2026-05-19 04:18:42 +00:00
parser: replace manual strip with trim_start_matches (#29)
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
This commit is contained in:
parent
9bb7583f30
commit
e7b82b7079
1 changed files with 1 additions and 4 deletions
|
|
@ -267,8 +267,5 @@ impl Parser {
|
|||
|
||||
fn ignore_bom(input: &str) -> &str {
|
||||
const BOM: &str = "\u{feff}";
|
||||
if input.starts_with(BOM) {
|
||||
return &input[BOM.len()..];
|
||||
}
|
||||
input
|
||||
input.trim_start_matches(BOM)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue