diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 18:51:01 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 19:38:19 -0500 |
| commit | e165c129324c48a54d321b2dd77e2ff4c7ee9739 (patch) | |
| tree | 5e61755ae5b692c1e5ce69f0c5d99e3a63325831 /clippy_lints/src/methods/string_extend_chars.rs | |
| parent | 2cb37a19110be1f80133a336acae2072ea8e310d (diff) | |
| download | rust-e165c129324c48a54d321b2dd77e2ff4c7ee9739.tar.gz rust-e165c129324c48a54d321b2dd77e2ff4c7ee9739.zip | |
Make diangostic item names consistent
Diffstat (limited to 'clippy_lints/src/methods/string_extend_chars.rs')
| -rw-r--r-- | clippy_lints/src/methods/string_extend_chars.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/string_extend_chars.rs b/clippy_lints/src/methods/string_extend_chars.rs index 6e7890a3080..d06658f2a5e 100644 --- a/clippy_lints/src/methods/string_extend_chars.rs +++ b/clippy_lints/src/methods/string_extend_chars.rs @@ -12,7 +12,7 @@ use super::STRING_EXTEND_CHARS; pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>, arg: &hir::Expr<'_>) { let obj_ty = cx.typeck_results().expr_ty(recv).peel_refs(); - if !is_type_diagnostic_item(cx, obj_ty, sym::string_type) { + if !is_type_diagnostic_item(cx, obj_ty, sym::String) { return; } if let Some(arglists) = method_chain_args(arg, &["chars"]) { @@ -20,7 +20,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr let self_ty = cx.typeck_results().expr_ty(target).peel_refs(); let ref_str = if *self_ty.kind() == ty::Str { "" - } else if is_type_diagnostic_item(cx, self_ty, sym::string_type) { + } else if is_type_diagnostic_item(cx, self_ty, sym::String) { "&" } else { return; |
