Skip to content

Commit 8f3a4d6

Browse files
chore: 🤖 update
1 parent 5d8edd2 commit 8f3a4d6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/write.rs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<S: Span> Report<'_, S> {
461461
hbar = hbar.filter(|l| {
462462
margin_label
463463
.as_ref()
464-
.map_or(true, |margin| !std::ptr::eq(margin.label, *l))
464+
.is_none_or(|margin| !std::ptr::eq(margin.label, *l))
465465
|| !is_line
466466
});
467467

@@ -569,7 +569,7 @@ impl<S: Span> Report<'_, S> {
569569
if is_start
570570
&& margin_label
571571
.as_ref()
572-
.map_or(true, |m| !std::ptr::eq(*label, m.label))
572+
.is_none_or(|m| !std::ptr::eq(*label, m.label))
573573
{
574574
// TODO: Check to see whether multi is the first on the start line or first on the end line
575575
Some(LineLabel {
@@ -660,7 +660,7 @@ impl<S: Span> Report<'_, S> {
660660
ll.label.display_info.msg.is_some()
661661
&& margin_label
662662
.as_ref()
663-
.map_or(true, |m| !std::ptr::eq(ll.label, m.label))
663+
.is_none_or(|m| !std::ptr::eq(ll.label, m.label))
664664
})
665665
.find(|(j, ll)| ll.col == col && row <= *j)
666666
.map(|(_, ll)| ll)
@@ -829,7 +829,7 @@ impl<S: Span> Report<'_, S> {
829829
&& line_label.label.display_info.msg.is_some()
830830
&& margin_label
831831
.as_ref()
832-
.map_or(true, |m| !std::ptr::eq(line_label.label, m.label))
832+
.is_none_or(|m| !std::ptr::eq(line_label.label, m.label))
833833
{
834834
[
835835
if line_label.multi {
@@ -1601,6 +1601,11 @@ mod tests {
16011601
1 | '🤨🤨🤨🤨' + import('missing');
16021602
| ^^^^|^^^^
16031603
| `------ This is of type
1604+
|
1605+
| Help 1: No need to try, they can't be compared.
1606+
|
1607+
| Help 2: Yeah, really, please stop.
1608+
| It has no resemblance.
16041609
---'
16051610
")
16061611
}

0 commit comments

Comments
 (0)