Skip to content

Commit

Permalink
Merge pull request #1071 from CosmWasm/const-constructors
Browse files Browse the repository at this point in the history
Make Uint256::from_{le,be}_bytes and ::new const
  • Loading branch information
webmaster128 authored Sep 6, 2021
2 parents 0dddda6 + e76043e commit 604e6af
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ and this project adheres to

- cosmwasm-std: Implement `Mul` and `MulAssign` for `Uint128`.
- cosmwasm-std: Implement `FromStr` for `Uint128`, `Uint256`, and `Uint512`.
- cosmwasm-std: Make `Uint256::from_le_bytes`, `::from_be_bytes` and `::new`
const.

### Changed

Expand All @@ -18,6 +20,9 @@ and this project adheres to
- cosmwasm-std: `Decimal::from_ratio` now accepts any types that implement
`Into<Uint128>` rather than `Into<u128>`.
- cosmwasm-crypto: Update dependency `k256` to ^0.9.6.
- cosmwasm-std: Add enum cases `Shl` to `OverflowOperation` (breaking; [#1071]).

[#1071]: https://github.com/CosmWasm/cosmwasm/pull/1071

### Fixed

Expand Down
1 change: 1 addition & 0 deletions packages/std/src/errors/std_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ pub enum OverflowOperation {
Mul,
Pow,
Shr,
Shl,
}

impl fmt::Display for OverflowOperation {
Expand Down
Loading

0 comments on commit 604e6af

Please sign in to comment.