Use chaining for DiagnosticBuilder construction and emit.
To avoid the use of a mutable local variable, and because it reads more nicely.
This commit is contained in:
@@ -357,7 +357,6 @@ pub fn struct_lint_level(
|
||||
if let Level::Expect(_) = level {
|
||||
let name = lint.name_lower();
|
||||
err.code(DiagnosticId::Lint { name, has_future_breakage, is_force_warn: false });
|
||||
|
||||
decorate(&mut err);
|
||||
err.emit();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user