diff --git a/CHANGELOG.md b/CHANGELOG.md index a790cccba6..1b639f28fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,12 +67,15 @@ and this project adheres to `ConversionOverflowError` and `DivideByZeroError`. ([#1896]) - cosmwasm-std: Remove old IBC version and make v3 the default. ([#1875]) - cosmwasm-storage: Removed, use [cw-storage-plus] instead. ([#1936]) +- cosmwasm-std: Remove `IbcReceiveResponse`'s `Default` implementation. Use + `IbcReceiveResponse::new` instead. ([#1942]) [cw-storage-plus]: https://github.com/CosmWasm/cw-storage-plus [#1875]: https://github.com/CosmWasm/cosmwasm/pull/1875 [#1890]: https://github.com/CosmWasm/cosmwasm/pull/1890 [#1896]: https://github.com/CosmWasm/cosmwasm/pull/1896 [#1936]: https://github.com/CosmWasm/cosmwasm/pull/1936 +[#1942]: https://github.com/CosmWasm/cosmwasm/pull/1942 ## [1.5.0] - 2023-10-31 diff --git a/MIGRATING.md b/MIGRATING.md index a6770b4f60..cc5450d2e6 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -107,12 +107,15 @@ major releases of `cosmwasm`. Note that you can also view the +const item: Item = Item::new("item"); ``` -- Replace all uses of `IbcReceiveResponse::set_ack` with calls to - `IbcReceiveResponse::new`: +- Replace all uses of `IbcReceiveResponse::set_ack` and + `IbcReceiveResponse::default` with calls to `IbcReceiveResponse::new`: ```diff - - Ok(IbcReceiveResponse::new().set_ack(b"{}")) - + Ok(IbcReceiveResponse::new(b"{}")) + -Ok(IbcReceiveResponse::new().set_ack(b"{}")) + +Ok(IbcReceiveResponse::new(b"{}")) + + -Ok(IbcReceiveResponse::default()) + +Ok(IbcReceiveResponse::new(b"")) ``` ## 1.4.x -> 1.5.0 diff --git a/packages/std/src/ibc.rs b/packages/std/src/ibc.rs index 44032ce707..91fb7cf63a 100644 --- a/packages/std/src/ibc.rs +++ b/packages/std/src/ibc.rs @@ -623,18 +623,6 @@ pub struct IbcReceiveResponse { pub events: Vec, } -// Custom implementation in order to implement it for all `T`, even if `T` is not `Default`. -impl Default for IbcReceiveResponse { - fn default() -> Self { - IbcReceiveResponse { - acknowledgement: Binary::default(), - messages: vec![], - attributes: vec![], - events: vec![], - } - } -} - impl IbcReceiveResponse { /// Create a new response with the given acknowledgement. ///