1 use crate::methods::{single_char_insert_string, single_char_push_string};
2 use clippy_utils::{match_def_path, paths};
4 use rustc_lint::LateContext;
6 pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, args: &[hir::Expr<'_>]) {
7 if let Some(fn_def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) {
8 if match_def_path(cx, fn_def_id, &paths::PUSH_STR) {
9 single_char_push_string::check(cx, expr, args);
10 } else if match_def_path(cx, fn_def_id, &paths::INSERT_STR) {
11 single_char_insert_string::check(cx, expr, args);