Skip to content

Commit 520004e

Browse files
authored
Merge pull request #2457 from CosmWasm/co/downcast_api
Remove downcast-rs
2 parents 8985e54 + c8e9314 commit 520004e

File tree

20 files changed

+4
-132
lines changed

20 files changed

+4
-132
lines changed

CHANGELOG.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ and this project adheres to
1515
`From<Int128> for i128` ([#2268])
1616
- cosmwasm-std: Implement `Uint128::from_{be,le}_bytes` and
1717
`Uint64::from_{be,le}_bytes`. ([#2269])
18-
- cosmwasm-std: Added new `Ibc2Msg` and `CosmosMsg::Ibc2` variant ([#2390],
19-
[#2403])
20-
- cosmwasm-std: Implement downcasting for `Api` trait. This allows using
21-
`MockApi::addr_make` from `DepsMut`. ([#2383])
18+
- cosmwasm-std: Added new `Ibc2Msg` and `CosmosMsg::Ibc2` variant ([#2340],
19+
[#2390], [#2403])
2220
- cosmwasm-std: Added `ibc2_port` to `ContractInfoResponse`. ([#2390], [#2403])
2321
- cosmwasm-vm: Added `ibc2_packet_receive` entrypoint ([#2403])
2422
- cosmwasm-vm: Add IBC Callbacks entrypoints to the `Entrypoints` enum.
@@ -91,7 +89,6 @@ and this project adheres to
9189
[#2367]: https://github.com/CosmWasm/cosmwasm/issues/2367
9290
[#2374]: https://github.com/CosmWasm/cosmwasm/issues/2374
9391
[#2378]: https://github.com/CosmWasm/cosmwasm/issues/2378
94-
[#2383]: https://github.com/CosmWasm/cosmwasm/issues/2383
9592
[#2390]: https://github.com/CosmWasm/cosmwasm/issues/2390
9693
[#2393]: https://github.com/CosmWasm/cosmwasm/issues/2393
9794
[#2399]: https://github.com/CosmWasm/cosmwasm/pull/2399

Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/burner/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/crypto-verify/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/cyberpunk/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/empty/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/floaty/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/hackatom/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/ibc-callbacks/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/ibc-reflect-send/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/ibc-reflect/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/ibc2/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/queue/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/reflect/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/replier/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/staking/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/virus/Cargo.lock

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/std/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ serde_json = "1.0.140"
6969
static_assertions = "1.1.0"
7070
thiserror = "1.0.26"
7171
rmp-serde = "1.3.0"
72-
downcast-rs = { version = "2.0.1", default-features = false }
7372

7473
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
7574
bech32 = "0.11.0"

packages/std/src/testing/mock.rs

-11
Original file line numberDiff line numberDiff line change
@@ -2715,15 +2715,4 @@ mod tests {
27152715
// we are not interested in the exact humanization, just that it works
27162716
mock_api.addr_humanize(&canonical_addr).unwrap();
27172717
}
2718-
2719-
#[test]
2720-
fn mock_api_downcast() {
2721-
let mut deps = mock_dependencies();
2722-
let deps_mut = deps.as_mut();
2723-
2724-
let mock_api = deps_mut.api.downcast_ref::<MockApi>().unwrap();
2725-
2726-
let addr = mock_api.addr_make("input");
2727-
assert_eq!(mock_api.addr_validate(addr.as_str()).unwrap(), addr);
2728-
}
27292718
}

0 commit comments

Comments
 (0)