mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Address build warning
This commit is contained in:
parent
6749b2d93e
commit
3851c0e22b
1 changed files with 1 additions and 1 deletions
|
@ -1885,7 +1885,7 @@ fn lint_chars_last_cmp_with_unwrap<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, info: &
|
||||||
}
|
}
|
||||||
|
|
||||||
/// lint for length-1 `str`s for methods in `PATTERN_METHODS`
|
/// lint for length-1 `str`s for methods in `PATTERN_METHODS`
|
||||||
fn lint_single_char_pattern<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr, arg: &'tcx hir::Expr) {
|
fn lint_single_char_pattern<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, _expr: &'tcx hir::Expr, arg: &'tcx hir::Expr) {
|
||||||
if let Some((Constant::Str(r), _)) = constant(cx, cx.tables, arg) {
|
if let Some((Constant::Str(r), _)) = constant(cx, cx.tables, arg) {
|
||||||
if r.len() == 1 {
|
if r.len() == 1 {
|
||||||
let c = r.chars().next().unwrap();
|
let c = r.chars().next().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue