Fix clippy warning

Fix cyclomatic_complexity warning on `check_expr` by allowing it. This
is preferable to increasing the threshold every time the method changes.
This commit is contained in:
Michael Wright 2018-04-02 06:42:30 +02:00
parent 57af95b6f5
commit 89cb053146

View file

@ -680,9 +680,7 @@ impl LintPass for Pass {
}
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
#[allow(unused_attributes)]
// ^ required because `cyclomatic_complexity` attribute shows up as unused
#[cyclomatic_complexity = "30"]
#[allow(cyclomatic_complexity)]
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
if in_macro(expr.span) {
return;