Replace some then
s with some then_some
s
This commit is contained in:
parent
8751fa1a9a
commit
5bf6a46032
24 changed files with 27 additions and 26 deletions
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue