Skip to content

Commit 1ee4fcb

Browse files
committed
Cleanup: rename Applicability variables using commonly used names
1 parent 189b4c3 commit 1ee4fcb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clippy_lints/src/methods/iter_skip_next.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use super::ITER_SKIP_NEXT;
1212
pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>, arg: &hir::Expr<'_>) {
1313
// lint if caller of skip is an Iterator
1414
if is_trait_method(cx, expr, sym::Iterator) {
15-
let mut application = Applicability::MachineApplicable;
15+
let mut applicability = Applicability::MachineApplicable;
1616
span_lint_and_then(
1717
cx,
1818
ITER_SKIP_NEXT,
@@ -24,7 +24,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr
2424
&& let PatKind::Binding(ann, _, _, _) = pat.kind
2525
&& ann != BindingMode::MUT
2626
{
27-
application = Applicability::Unspecified;
27+
applicability = Applicability::Unspecified;
2828
diag.span_help(
2929
pat.span,
3030
format!("for this change `{}` has to be mutable", snippet(cx, pat.span, "..")),
@@ -35,7 +35,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr
3535
expr.span.trim_start(recv.span).unwrap(),
3636
"use `nth` instead",
3737
format!(".nth({})", snippet(cx, arg.span, "..")),
38-
application,
38+
applicability,
3939
);
4040
},
4141
);

clippy_lints/src/non_std_lazy_statics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl LazyInfo {
219219
fn lint(&self, cx: &LateContext<'_>, sugg_map: &FxIndexMap<DefId, Option<String>>) {
220220
// Applicability might get adjusted to `Unspecified` later if any calls
221221
// in `calls_span_and_id` are not replaceable judging by the `sugg_map`.
222-
let mut appl = Applicability::MachineApplicable;
222+
let mut app = Applicability::MachineApplicable;
223223
let mut suggs = vec![(self.ty_span_no_args, "std::sync::LazyLock".to_string())];
224224

225225
for (span, def_id) in &self.calls_span_and_id {
@@ -228,7 +228,7 @@ impl LazyInfo {
228228
suggs.push((*span, sugg));
229229
} else {
230230
// If NO suggested replacement, not machine applicable
231-
appl = Applicability::Unspecified;
231+
app = Applicability::Unspecified;
232232
}
233233
}
234234

@@ -239,7 +239,7 @@ impl LazyInfo {
239239
self.ty_span_no_args,
240240
"this type has been superseded by `LazyLock` in the standard library",
241241
|diag| {
242-
diag.multipart_suggestion("use `std::sync::LazyLock` instead", suggs, appl);
242+
diag.multipart_suggestion("use `std::sync::LazyLock` instead", suggs, app);
243243
},
244244
);
245245
}

0 commit comments

Comments
 (0)