1
Fork 0

Replace some thens with some then_somes

This commit is contained in:
Maybe Waffle 2023-02-15 17:39:43 +00:00
parent 8751fa1a9a
commit 5bf6a46032
24 changed files with 27 additions and 26 deletions

View file

@ -2308,7 +2308,8 @@ impl EarlyLintPass for IncompleteFeatures {
.for_each(|(&name, &span)| {
let note = rustc_feature::find_feature_issue(name, GateIssue::Language)
.map(|n| BuiltinIncompleteFeaturesNote { n });
let help = HAS_MIN_FEATURES.contains(&name).then(|| BuiltinIncompleteFeaturesHelp);
let help =
HAS_MIN_FEATURES.contains(&name).then_some(BuiltinIncompleteFeaturesHelp);
cx.emit_spanned_lint(
INCOMPLETE_FEATURES,
span,

View file

@ -487,7 +487,7 @@ impl LintStore {
let mut groups: Vec<_> = self
.lint_groups
.iter()
.filter_map(|(k, LintGroup { depr, .. })| depr.is_none().then(|| k))
.filter_map(|(k, LintGroup { depr, .. })| depr.is_none().then_some(k))
.collect();
groups.sort();
let groups = groups.iter().map(|k| Symbol::intern(k));