Skip to content

Commit

Permalink
core: fix and feature guard control_flow after move from sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Jun 25, 2024
1 parent 65a21c7 commit 3fd785f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ migrations = [
"linkme",
]
benches = ["proptest"]
control_flow = ["futures", "tokio"]

[dependencies]
namada_macros = {path = "../macros"}
namada_migrations = {path = "../migrations", optional = true}

arse-merkle-tree.workspace = true
bech32.workspace = true
borsh.workspace = true
Expand All @@ -43,6 +45,7 @@ ed25519-consensus.workspace = true
ethabi.workspace = true
ethbridge-structs.workspace = true
eyre.workspace = true
futures = { workspace = true, optional = true }
ibc.workspace = true
ics23.workspace = true
impl-num-traits = "0.1.2"
Expand All @@ -69,16 +72,19 @@ tendermint = {workspace = true}
tendermint-proto = {workspace = true}
thiserror.workspace = true
tiny-keccak = {version = "2.0.2", features = ["keccak"]}
tokio = { workspace = true, optional = true, features = ["full"]}
tracing.workspace = true
uint = "0.9.5"
zeroize.workspace = true

[dev-dependencies]
assert_matches.workspace = true
futures.workspace = true
pretty_assertions.workspace = true
proptest.workspace = true
rand.workspace = true
rand_core.workspace = true
test-log.workspace = true
tokio = { workspace = true, features = ["full"] }
toml.workspace = true
tracing-subscriber.workspace = true
2 changes: 2 additions & 0 deletions crates/core/src/control_flow/time.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Time related logic for futures.

#![allow(clippy::arithmetic_side_effects)]

use std::future::Future;
use std::ops::ControlFlow;

Expand Down
2 changes: 2 additions & 0 deletions crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

pub mod arith;
pub mod bytes;
#[cfg(any(test, feature = "control_flow"))]
pub mod control_flow;
pub mod governance;
pub mod hints;
pub mod proof_of_stake;
Expand Down
2 changes: 1 addition & 1 deletion crates/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub mod signing;
#[allow(clippy::result_large_err)]
pub mod tx;

pub mod control_flow;
pub mod error;
pub mod events;
pub(crate) mod internal_macros;
Expand All @@ -55,6 +54,7 @@ use io::Io;
use masp::{ShieldedContext, ShieldedUtils};
use namada_core::address::Address;
use namada_core::collections::HashSet;
pub use namada_core::control_flow;
use namada_core::dec::Dec;
use namada_core::ethereum_events::EthAddress;
use namada_core::ibc::core::host::types::identifiers::{ChannelId, PortId};
Expand Down

0 comments on commit 3fd785f

Please sign in to comment.