Skip to content

Commit

Permalink
build: clippy allow unreachable patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo-sturdy committed May 10, 2024
1 parent ac0d1c2 commit 21e3d29
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ builds = [
]

[dependencies]
cosmwasm-std = "1.5"
cosmwasm-std = "1.5.4"
cosmwasm-schema = "1.2.1"
apollo-cw-asset = "0.1.0"
cw-controllers = "1.0.1"
cw-dex = "0.5.3"
cw-dex-astroport = { version = "0.2.0-rc.1", optional = true}
cw-dex-osmosis = { version = "0.1.0", optional = true}
cw-storage-plus = "1.0.1"
cw2 = "1.0.1"
cw20 = "1.0.1"
Expand Down
21 changes: 19 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skip_core_tasks = true

[env]
# If you bump this version, verify RUST_VERSION correctness
RUST_OPTIMIZER_VERSION = "0.15.0"
RUST_OPTIMIZER_VERSION = "0.15.1"
# Use rust version from rust-optimizer Dockerfile (see https://github.com/CosmWasm/rust-optimizer/blob/main/Dockerfile#L1)
# to be sure that we compile / test against the same version
RUST_VERSION = "1.72.0"
Expand Down Expand Up @@ -117,7 +117,7 @@ args = ["machete", "--fix"]


# Unoptimized Wasm build of contract for testing
[tasks.wasm]
[tasks.wasm-build]
toolchain = "${RUST_VERSION}"
command = "cargo"
args = [
Expand All @@ -130,6 +130,23 @@ args = [
"osmosis"
]

# Temp command to remove "unsupported opcodes" error (https://github.com/CosmWasm/cosmwasm/issues/1727).
# This is needed because we are running tests with an old version of test-tube.
[tasks.wasm-opt]
toolchain = "${RUST_VERSION}"
install_crate = { crate_name = "wasm-opt", binary = "wasm-opt" }
command = "wasm-opt"
args = [
"-Os",
"--signext-lowering",
"target/wasm32-unknown-unknown/release/cw_dex_router.wasm",
"-o",
"target/wasm32-unknown-unknown/release/cw_dex_router.wasm"
]

[tasks.wasm]
dependencies = ["wasm-build", "wasm-opt"]

# Run all tests
[tasks.test]
toolchain = "${RUST_VERSION}"
Expand Down
1 change: 1 addition & 0 deletions src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl Deref for Pool {
type Target = dyn PoolTrait;

fn deref(&self) -> &Self::Target {
#[allow(unreachable_patterns)]
match self {
#[cfg(feature = "osmosis")]
Pool::Osmosis(pool) => pool as &dyn PoolTrait,
Expand Down

0 comments on commit 21e3d29

Please sign in to comment.