Skip to content

Commit

Permalink
chore: remove try_into()
Browse files Browse the repository at this point in the history
  • Loading branch information
detectivekim committed Aug 19, 2024
1 parent 7296038 commit 3a4f935
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libraries/order_id.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ pub impl OrderIdImpl of OrderIdTrait {
self.tick.into()
};
assert(t < 0x1000000_i32, 'tick overflow');
return self.book_id.try_into().unwrap() * TWO_POW_64.try_into().unwrap()
+ t.into() * TWO_POW_40.try_into().unwrap()
+ self.index.into();
return self.book_id * TWO_POW_64.into() + t.into() * TWO_POW_40.into() + self.index.into();
}

fn decode(value: felt252) -> OrderId {
Expand Down

0 comments on commit 3a4f935

Please sign in to comment.