Skip to content

feat: implement saturating_sub for BlockNumber#2719

Open
giwaov wants to merge 1 commit into0xMiden:nextfrom
giwaov:feat/block-number-saturating-sub
Open

feat: implement saturating_sub for BlockNumber#2719
giwaov wants to merge 1 commit into0xMiden:nextfrom
giwaov:feat/block-number-saturating-sub

Conversation

@giwaov
Copy link
Copy Markdown

@giwaov giwaov commented Apr 1, 2026

Implements \saturating_sub\ for \BlockNumber, complementing the existing \checked_sub. Delegates to \u32::saturating_sub, saturating at \BlockNumber::GENESIS\ on underflow.

Closes #2660

@giwaov giwaov force-pushed the feat/block-number-saturating-sub branch from 225b374 to 650afaf Compare April 5, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement saturating_sub for BlockNumber

1 participant