Skip to content

Commit 4f64fc3

Browse files
committed
fix: unstable let expression
See rust-lang/rust#53667 for more
1 parent 10bcd8d commit 4f64fc3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/credit/src/credit_facility/interest_outstanding.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ pub(super) fn project<'a>(
7777
let mut overdue = UsdCents::ZERO;
7878
let mut defaulted = UsdCents::ZERO;
7979
for accrual in accruals {
80-
if let Some(interest_overdue_duration) = terms.interest_overdue_duration
81-
&& interest_overdue_duration.is_past_end_date(accrual.accrued_at)
82-
{
83-
defaulted += accrual.remaining;
80+
if let Some(interest_overdue_duration) = terms.interest_overdue_duration {
81+
if interest_overdue_duration.is_past_end_date(accrual.accrued_at) {
82+
defaulted += accrual.remaining;
83+
continue;
84+
}
8485
} else if terms
8586
.interest_due_duration
8687
.is_past_end_date(accrual.accrued_at)

0 commit comments

Comments
 (0)