Run clippy --fix
for unnecessary_map_or
lint
This commit is contained in:
parent
39dc268459
commit
264fa0fc54
39 changed files with 61 additions and 67 deletions
|
@ -391,7 +391,7 @@ impl<'a> StripUnconfigured<'a> {
|
|||
validate_attr::deny_builtin_meta_unsafety(&self.sess.psess, &meta_item);
|
||||
|
||||
(
|
||||
parse_cfg(&meta_item, self.sess).map_or(true, |meta_item| {
|
||||
parse_cfg(&meta_item, self.sess).is_none_or(|meta_item| {
|
||||
attr::cfg_matches(meta_item, &self.sess, self.lint_node_id, self.features)
|
||||
}),
|
||||
Some(meta_item),
|
||||
|
|
|
@ -159,7 +159,7 @@ impl<'dcx, 'matcher> Tracker<'matcher> for CollectTrackerAndEmitter<'dcx, 'match
|
|||
if self
|
||||
.best_failure
|
||||
.as_ref()
|
||||
.map_or(true, |failure| failure.is_better_position(*approx_position))
|
||||
.is_none_or(|failure| failure.is_better_position(*approx_position))
|
||||
{
|
||||
self.best_failure = Some(BestFailure {
|
||||
token: token.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue