Skip to content

Commit eb2cfe6

Browse files
authored
Merge pull request #3259 from matthiaskrgr/build_warnings
resolve build warnings in clippy_lints/src/format.rs
2 parents b393d06 + fd5ea0d commit eb2cfe6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/format.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::rustc::{declare_tool_lint, lint_array};
44
use if_chain::if_chain;
55
use crate::rustc::ty;
66
use crate::syntax::ast::LitKind;
7-
use crate::syntax_pos::Span;
87
use crate::utils::paths;
98
use crate::utils::{in_macro, is_expn_of, last_path_segment, match_def_path, match_type, opt_def_id, resolve_node, snippet, span_lint_and_then, walk_ptrs_ty};
109
use crate::rustc_errors::Applicability;
@@ -60,7 +59,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
6059
if let ExprKind::AddrOf(_, ref format_arg) = format_arg.node;
6160
then {
6261
let (message, sugg) = if_chain! {
63-
if let ExprKind::MethodCall(ref path, ref span, ref expr) = format_arg.node;
62+
if let ExprKind::MethodCall(ref path, _, _) = format_arg.node;
6463
if path.ident.as_interned_str() == "to_string";
6564
then {
6665
("`to_string()` is enough",

0 commit comments

Comments
 (0)