fix a couple of clippy warnings:
filter_next manual_strip redundant_static_lifetimes single_char_pattern unnecessary_cast unused_unit op_ref redundant_closure useless_conversion
This commit is contained in:
parent
56293097f7
commit
bcd2f2df67
11 changed files with 14 additions and 21 deletions
|
@ -1574,7 +1574,7 @@ fn normalize_src(src: &mut String, start_pos: BytePos) -> Vec<NormalizedPos> {
|
|||
|
||||
/// Removes UTF-8 BOM, if any.
|
||||
fn remove_bom(src: &mut String, normalized_pos: &mut Vec<NormalizedPos>) {
|
||||
if src.starts_with("\u{feff}") {
|
||||
if src.starts_with('\u{feff}') {
|
||||
src.drain(..3);
|
||||
normalized_pos.push(NormalizedPos { pos: BytePos(0), diff: 3 });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue