diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-11-04 13:48:50 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-11-04 13:48:50 +0100 |
| commit | bcd2f2df67ac755b23f540a0657572eade281f12 (patch) | |
| tree | b69870f58968dee7ffb541ab0badc745045d53de /compiler/rustc_span/src/lib.rs | |
| parent | 56293097f7f877f1350a6cd00f79d03132f16515 (diff) | |
| download | rust-bcd2f2df67ac755b23f540a0657572eade281f12.tar.gz rust-bcd2f2df67ac755b23f540a0657572eade281f12.zip | |
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
Diffstat (limited to 'compiler/rustc_span/src/lib.rs')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 97b5c11b0fe..f52b64f4883 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -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 }); } |
