summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/clippy_lints/src/methods/chars_next_cmp.rs
blob: a6701d8830e77d099f17bcc7192f6f6cac566190 (plain)
1
2
3
4
5
6
7
8
use rustc_lint::LateContext;

use super::CHARS_NEXT_CMP;

/// Checks for the `CHARS_NEXT_CMP` lint.
pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, info: &crate::methods::BinaryExprInfo<'_>) -> bool {
    crate::methods::chars_cmp::check(cx, info, &["chars", "next"], CHARS_NEXT_CMP, "starts_with")
}