Replace unnecessary map_or_else with map_or
This commit is contained in:
parent
f3a0f68453
commit
2e99439900
2 changed files with 2 additions and 2 deletions
|
@ -968,7 +968,7 @@ fn warn_if_doc(cx: &EarlyContext<'_>, node_span: Span, node_kind: &str, attrs: &
|
|||
while let Some(attr) = attrs.next() {
|
||||
if attr.is_doc_comment() {
|
||||
sugared_span =
|
||||
Some(sugared_span.map_or_else(|| attr.span, |span| span.with_hi(attr.span.hi())));
|
||||
Some(sugared_span.map_or(attr.span, |span| span.with_hi(attr.span.hi())));
|
||||
}
|
||||
|
||||
if attrs.peek().map(|next_attr| next_attr.is_doc_comment()).unwrap_or_default() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue