Use fm_method_str in lint formatting

Co-authored-by: Catherine Flores <catherine.3.flores@gmail.com>
This commit is contained in:
sjwang05 2023-11-03 10:32:19 -07:00 committed by GitHub
parent 10f3977eba
commit c50af350a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,7 @@ impl LateLintPass<'_> for LinesFilterMapOk {
LINES_FILTER_MAP_OK, LINES_FILTER_MAP_OK,
fm_span, fm_span,
&format!( &format!(
"`{}()` will run forever if the iterator repeatedly produces an `Err`", "`{fm_method_str}()` will run forever if the iterator repeatedly produces an `Err`",
fm_method.ident
), ),
|diag| { |diag| {
diag.span_note( diag.span_note(