Remove to_string on msg

Co-authored-by: Philipp Krones <hello@philkrones.com>
This commit is contained in:
rsulli55 2020-10-25 18:11:38 -07:00 committed by Ryan Sullivant
parent 55dc822062
commit e9612f3eca

View file

@ -3111,7 +3111,7 @@ fn lint_search_is_some<'tcx>(
then {
let msg = "called `is_some()` after calling `find()` \
on a string. This is more succinctly expressed by calling \
`contains()`.".to_string();
`contains()`";
let mut applicability = Applicability::MachineApplicable;
let find_arg = snippet_with_applicability(cx, search_args[1].span, "..", &mut applicability);
span_lint_and_sugg(