Skip to content

Commit 0d3a3d8

Browse files
committed
fix(cardano-blockchain-types): use const
Signed-off-by: bkioshn <[email protected]>
1 parent b2b6b63 commit 0d3a3d8

File tree

1 file changed

+3
-3
lines changed
  • rust/cardano-blockchain-types/src

1 file changed

+3
-3
lines changed

rust/cardano-blockchain-types/src/fork.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ impl Fork {
2525
/// Is the fork for immutable data.
2626
#[must_use]
2727
pub fn is_immutable(&self) -> bool {
28-
self.0 == 0
28+
self == &Self::IMMUTABLE
2929
}
3030

3131
/// Is the fork for backfill data.
3232
#[must_use]
3333
pub fn is_backfill(&self) -> bool {
34-
self.0 == 1
34+
self == &Self::BACKFILL
3535
}
3636

3737
/// Is the fork for live data.
3838
#[must_use]
3939
pub fn is_live(&self) -> bool {
40-
self.0 > 1
40+
self >= &Self::FIRST_LIVE
4141
}
4242

4343
/// Convert an `<T>` to `Fork` (saturate if out of range).

0 commit comments

Comments
 (0)