diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-08-01 17:46:59 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-08-07 22:47:32 +0200 |
| commit | fb975cd6fb0858fe285376792dcf40d324ebfad5 (patch) | |
| tree | 66f814fa0e7e9a0f66dcc779a60874c5bfdffd6d /src/librustc_parse_format | |
| parent | fca81fa3cdfaf9c53e1793c70448f106b74b358f (diff) | |
| download | rust-fb975cd6fb0858fe285376792dcf40d324ebfad5.tar.gz rust-fb975cd6fb0858fe285376792dcf40d324ebfad5.zip | |
fix clippy::map_identity: remove redundant .map(|x| x) call
Diffstat (limited to 'src/librustc_parse_format')
| -rw-r--r-- | src/librustc_parse_format/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_parse_format/lib.rs b/src/librustc_parse_format/lib.rs index 7db62f3493e..ebb3aa3866e 100644 --- a/src/librustc_parse_format/lib.rs +++ b/src/librustc_parse_format/lib.rs @@ -820,7 +820,7 @@ fn find_skips_from_snippet( } let r_start = str_style.map(|r| r + 1).unwrap_or(0); - let r_end = str_style.map(|r| r).unwrap_or(0); + let r_end = str_style.unwrap_or(0); let s = &snippet[r_start + 1..snippet.len() - r_end - 1]; (find_skips(s, str_style.is_some()), true) } |
