Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions crates/miden-tx/src/host/tx_progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,10 @@ impl CycleInterval {

/// Calculate the length of the interval
pub fn len(&self) -> usize {
if let Some(start) = self.start
&& let Some(end) = self.end
&& end >= start
{
return end - start;
// Safe, straightforward computation without relying on unstable syntax
match (self.start, self.end) {
(Some(start), Some(end)) if end >= start => end - start,
_ => 0,
}

0
}
}
Loading