]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/clippy_lints/src/methods/chars_next_cmp_with_unwrap.rs
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
[rust.git] / src / tools / clippy / clippy_lints / src / methods / chars_next_cmp_with_unwrap.rs
1 use rustc_lint::LateContext;
2
3 use super::CHARS_NEXT_CMP;
4
5 /// Checks for the `CHARS_NEXT_CMP` lint with `unwrap()`.
6 pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, info: &crate::methods::BinaryExprInfo<'_>) -> bool {
7     crate::methods::chars_cmp_with_unwrap::check(cx, info, &["chars", "next", "unwrap"], CHARS_NEXT_CMP, "starts_with")
8 }