fmt clippy
This commit is contained in:
parent
839ad09689
commit
c9342d0121
41 changed files with 2187 additions and 1488 deletions
|
|
@ -32,9 +32,10 @@ impl LateLintPass for NeedlessUpdatePass {
|
|||
let ty = cx.tcx.expr_ty(expr);
|
||||
if let TyStruct(def, _) = ty.sty {
|
||||
if fields.len() == def.struct_variant().fields.len() {
|
||||
span_lint(cx, NEEDLESS_UPDATE, base.span,
|
||||
"struct update has no effect, all the fields \
|
||||
in the struct have already been specified");
|
||||
span_lint(cx,
|
||||
NEEDLESS_UPDATE,
|
||||
base.span,
|
||||
"struct update has no effect, all the fields in the struct have already been specified");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue