Skip to content

Commit e65152a

Browse files
authored
Merge pull request #2492 from CosmWasm/clippy-1.87.0
Remove unnecessary brackets and incorrect indent to make clippy 1.87 happy
2 parents 7a347dc + 7e8590c commit e65152a

File tree

15 files changed

+8
-175
lines changed

15 files changed

+8
-175
lines changed

contracts/burner/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests.
6-
//! 1. First copy them over verbatim,
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::{coins, Attribute, BankMsg, ContractResult, Order, Response, SubMsg};
216
use cosmwasm_vm::testing::{execute, instantiate, migrate, mock_env, mock_info, mock_instance};

contracts/crypto-verify/tests/integration.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests.
6-
//! 1. First copy them over verbatim,
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see init/execute(deps.as_mut(), ...) you must replace it with init/execute(&mut deps, ...)
19-
//! 5. Anywhere you see query(deps.as_ref(), ...) you must replace it with query(&mut deps, ...)
20-
//! (Use cosmwasm_vm::testing::{init, execute, query}, instead of the contract variants).
214
225
use cosmwasm_std::{Binary, Response, Uint128};
236
use cosmwasm_vm::testing::{

contracts/cyberpunk/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests as follows:
6-
//! 1. Copy them over verbatim
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::{from_json, Empty, Env, Response};
216
use cosmwasm_vm::testing::{

contracts/empty/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests.
6-
//! 1. First copy them over verbatim,
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_vm::testing::mock_instance;
216

contracts/hackatom/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests as follows:
6-
//! 1. Copy them over verbatim
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::{
216
assert_approx_eq, coins, to_json_vec, Addr, BankMsg, Binary, ContractResult, Empty,

contracts/ibc-callbacks/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests.
6-
//! 1. First copy them over verbatim,
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_vm::testing::mock_instance;
216

contracts/ibc-reflect-send/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests.
6-
//! 1. First copy them over verbatim,
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::testing::{
216
mock_ibc_channel_connect_ack, mock_ibc_channel_open_init, mock_ibc_channel_open_try,

contracts/ibc-reflect/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests.
6-
//! 1. First copy them over verbatim,
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::testing::{
216
mock_ibc_channel_connect_ack, mock_ibc_channel_open_init, mock_ibc_channel_open_try,

contracts/queue/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests as follows:
6-
//! 1. Copy them over verbatim
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::{from_json, MessageInfo, Response};
216
use cosmwasm_vm::{

contracts/reflect/tests/integration.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
//! This integration test tries to run and call the generated wasm.
22
//! It depends on a Wasm build being available, which you can create with `cargo wasm`.
33
//! Then running `cargo integration-test` will validate we can properly call into that generated Wasm.
4-
//!
5-
//! You can easily convert unit tests to integration tests as follows:
6-
//! 1. Copy them over verbatim
7-
//! 2. Then change
8-
//! let mut deps = mock_dependencies(20, &[]);
9-
//! to
10-
//! let mut deps = mock_instance(WASM, &[]);
11-
//! 3. If you access raw storage, where ever you see something like:
12-
//! deps.storage.get(CONFIG_KEY).expect("no data stored");
13-
//! replace it with:
14-
//! deps.with_storage(|store| {
15-
//! let data = store.get(CONFIG_KEY).expect("no data stored");
16-
//! //...
17-
//! });
18-
//! 4. Anywhere you see query(&deps, ...) you must replace it with query(&mut deps, ...)
194
205
use cosmwasm_std::{
216
coin, coins, from_json, BankMsg, BankQuery, Binary, Coin, ContractResult, Event, QueryRequest,

0 commit comments

Comments
 (0)