mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
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:
parent
57af95b6f5
commit
89cb053146
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue