Skip to content

Commit

Permalink
Merge pull request #1449 from 0xekez/main
Browse files Browse the repository at this point in the history
Remove non_exhaustive from IBC message types.
  • Loading branch information
webmaster128 authored Oct 14, 2022
2 parents cd2ba32 + 41135a8 commit 2e215cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ and this project adheres to
`ed25519_verify` and `ed25519_batch_verify` import implementations we now exit
early if the gas left is not sufficient to perform the operation.

### Changed

- cosmwasm-std: Remove `non_exhaustive` from IBC types `IbcChannelOpenMsg`,
`IbcChannelConnectMsg` and `IbcChannelCloseMsg` in order to allow exhaustive
matching over the possible scenarios without an unused fallback case
([#1449]).

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

## [1.1.4] - 2022-10-03

### Fixed
Expand Down
3 changes: 0 additions & 3 deletions packages/std/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ impl IbcAcknowledgement {
/// The message that is passed into `ibc_channel_open`
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum IbcChannelOpenMsg {
/// The ChanOpenInit step from https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#channel-lifecycle-management
OpenInit { channel: IbcChannel },
Expand Down Expand Up @@ -315,7 +314,6 @@ pub struct Ibc3ChannelOpenResponse {
/// The message that is passed into `ibc_channel_connect`
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum IbcChannelConnectMsg {
/// The ChanOpenAck step from https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#channel-lifecycle-management
OpenAck {
Expand Down Expand Up @@ -368,7 +366,6 @@ impl From<IbcChannelConnectMsg> for IbcChannel {
/// The message that is passed into `ibc_channel_close`
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum IbcChannelCloseMsg {
/// The ChanCloseInit step from https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#channel-lifecycle-management
CloseInit { channel: IbcChannel },
Expand Down

0 comments on commit 2e215cf

Please sign in to comment.