Skip to content

Commit f7723ca

Browse files
committed
Fix dogfood test
1 parent 55344c8 commit f7723ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/methods/single_char_insert_string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, receiver: &hir::
2929

3030
if let ExprKind::AddrOf(BorrowKind::Ref, _, arg) = &args[1].kind
3131
&& let ExprKind::MethodCall(path_segment, method_arg, _, _) = &arg.kind
32-
&& path_segment.ident.as_str() == "to_string"
32+
&& path_segment.ident.name == rustc_span::sym::to_string
3333
&& (is_ref_char(cx, method_arg) || is_char(cx, method_arg))
3434
{
3535
let base_string_snippet =

clippy_lints/src/methods/single_char_push_string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, receiver: &hir::
2828

2929
if let ExprKind::AddrOf(BorrowKind::Ref, _, arg) = &args[0].kind
3030
&& let ExprKind::MethodCall(path_segment, method_arg, _, _) = &arg.kind
31-
&& path_segment.ident.as_str() == "to_string"
31+
&& path_segment.ident.name == rustc_span::sym::to_string
3232
&& (is_ref_char(cx, method_arg) || is_char(cx, method_arg))
3333
{
3434
let base_string_snippet =

0 commit comments

Comments
 (0)