Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non_exhaustive from IBC message types. #1449

Merged
merged 2 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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