9 lines
341 B
Rust
9 lines
341 B
Rust
|
use rustc_lint::LateContext;
|
||
|
|
||
|
use super::CHARS_NEXT_CMP;
|
||
|
|
||
|
/// Checks for the `CHARS_NEXT_CMP` lint with `unwrap()`.
|
||
|
pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, info: &crate::methods::BinaryExprInfo<'_>) -> bool {
|
||
|
crate::methods::chars_cmp_with_unwrap::check(cx, info, &["chars", "next", "unwrap"], CHARS_NEXT_CMP, "starts_with")
|
||
|
}
|