From aef07e33929b235c63178d541ac0e1b4823ee8f3 Mon Sep 17 00:00:00 2001 From: bootandy Date: Thu, 22 Feb 2018 10:11:20 -0500 Subject: [PATCH] Do not pass Span by reference --- clippy_lints/src/methods.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index 1c02f73cc1a..a7bdd10ed66 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -744,7 +744,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { lint_unnecessary_fold(cx, expr, arglists[0]); } - lint_or_fun_call(cx, expr, method_span, &method_call.name.as_str(), args); + lint_or_fun_call(cx, expr, *method_span, &method_call.name.as_str(), args); let self_ty = cx.tables.expr_ty_adjusted(&args[0]); if args.len() == 1 && method_call.name == "clone" { @@ -845,7 +845,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { } /// Checks for the `OR_FUN_CALL` lint. -fn lint_or_fun_call(cx: &LateContext, expr: &hir::Expr, method_span: &Span, name: &str, args: &[hir::Expr]) { +fn lint_or_fun_call(cx: &LateContext, expr: &hir::Expr, method_span: Span, name: &str, args: &[hir::Expr]) { /// Check for `unwrap_or(T::new())` or `unwrap_or(T::default())`. fn check_unwrap_or_default( cx: &LateContext, @@ -894,7 +894,7 @@ fn lint_or_fun_call(cx: &LateContext, expr: &hir::Expr, method_span: &Span, name fn check_general_case( cx: &LateContext, name: &str, - method_span: &Span, + method_span: Span, fun_span: Span, self_expr: &hir::Expr, arg: &hir::Expr,