Skip to content

Commit

Permalink
remove unnecessary trait bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Aug 1, 2024
1 parent f67da93 commit 328c1ae
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 23 deletions.
1 change: 0 additions & 1 deletion crates/ethereum_bridge/src/vp/bridge_pool_vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ impl AmountDelta {
pub struct BridgePool<'ctx, S, CA, EVAL, TokenKeys>
where
S: 'static + StateRead,
EVAL: 'static + VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/ethereum_bridge/src/vp/eth_bridge_vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub struct Error(#[from] native_vp::Error);
pub struct EthBridge<'ctx, S, CA, EVAL, TokenKeys>
where
S: 'static + StateRead,
EVAL: 'static + VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/ethereum_bridge/src/vp/nut_vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub struct Error(#[from] native_vp::Error);
pub struct NonUsableTokens<'ctx, S, CA, EVAL, TokenKeys>
where
S: 'static + StateRead,
EVAL: 'static + VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/governance/src/vp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pub enum Error {
pub struct GovernanceVp<'ctx, S, CA, EVAL, PoS, TokenKeys>
where
S: StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/governance/src/vp/pgf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ pub enum Error {
pub struct PgfVp<'ctx, S, CA, EVAL>
where
S: 'static + StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
2 changes: 0 additions & 2 deletions crates/ibc/src/vp/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use crate::{IbcCommonContext, IbcStorageContext};
pub struct PseudoExecutionContext<'view, 'a, S, CA, EVAL, Token>
where
S: 'static + StateRead,
EVAL: VpEvaluator<'a, S, CA, EVAL>,
{
/// Execution context and storage
pub storage: PseudoExecutionStorage<'view, 'a, S, CA, EVAL>,
Expand All @@ -40,7 +39,6 @@ where
pub struct PseudoExecutionStorage<'view, 'a, S, CA, EVAL>
where
S: 'static + StateRead,
EVAL: VpEvaluator<'a, S, CA, EVAL>,
{
/// Temporary store for pseudo execution
store: HashMap<Key, StorageModification>,
Expand Down
1 change: 0 additions & 1 deletion crates/ibc/src/vp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ pub struct Ibc<
Transfer,
> where
S: 'static + StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/parameters/src/vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub type Result<T> = std::result::Result<T, Error>;
pub struct ParametersVp<'ctx, S, CA, EVAL, Gov>
where
S: 'static + StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/proof_of_stake/src/vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pub type Result<T> = std::result::Result<T, Error>;
pub struct PosVp<'ctx, S, CA, EVAL, Gov>
where
S: StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/shielded_token/src/vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ pub type Result<T> = std::result::Result<T, Error>;
pub struct MaspVp<'ctx, S, CA, EVAL, Params, Gov, Ibc, TransToken, Transfer>
where
S: 'static + StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
1 change: 0 additions & 1 deletion crates/trans_token/src/vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ pub type Result<T> = std::result::Result<T, Error>;
pub struct MultitokenVp<'ctx, S, CA, EVAL, Params, Gov>
where
S: 'static + StateRead,
EVAL: VpEvaluator<'ctx, S, CA, EVAL>,
{
/// Context to interact with the host structures.
pub ctx: Ctx<'ctx, S, CA, EVAL>,
Expand Down
6 changes: 0 additions & 6 deletions crates/vm/src/host_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ pub struct TxVmEnv<MEM, D, H, CA>
where
D: DB + for<'iter> DBIter<'iter>,
H: StorageHasher,
CA: WasmCacheAccess,
{
/// The VM memory for bi-directional data passing
pub memory: MEM,
Expand All @@ -104,7 +103,6 @@ pub struct TxCtx<D, H, CA>
where
D: DB + for<'iter> DBIter<'iter>,
H: StorageHasher,
CA: WasmCacheAccess,
{
/// Mutable access to write log.
pub write_log: HostRef<RwAccess, WriteLog>,
Expand Down Expand Up @@ -302,8 +300,6 @@ pub struct VpVmEnv<MEM, D, H, EVAL, CA>
where
D: DB + for<'iter> DBIter<'iter>,
H: StorageHasher,
EVAL: VpEvaluator,
CA: WasmCacheAccess,
{
/// The VM memory for bi-directional data passing
pub memory: MEM,
Expand All @@ -316,8 +312,6 @@ pub struct VpCtx<D, H, EVAL, CA>
where
D: DB + for<'iter> DBIter<'iter>,
H: StorageHasher,
EVAL: VpEvaluator,
CA: WasmCacheAccess,
{
/// The address of the account that owns the VP
pub address: HostRef<RoAccess, Address>,
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/wasm/compilation_cache/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::{WasmCacheAccess, WasmCacheRoAccess};

/// Cache handle. Thread-safe.
#[derive(Debug, Clone)]
pub struct Cache<N: CacheName, A: WasmCacheAccess> {
pub struct Cache<N, A> {
/// Cached files directory
dir: PathBuf,
/// Compilation progress
Expand Down
4 changes: 0 additions & 4 deletions crates/vp/src/native_vp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ pub trait NativeVp<'a> {
pub struct Ctx<'a, S, CA, EVAL>
where
S: StateRead,
EVAL: VpEvaluator<'a, S, CA, EVAL>,
{
/// The address of the account that owns the VP
pub address: &'a Address,
Expand Down Expand Up @@ -86,7 +85,6 @@ where
pub trait VpEvaluator<'a, S, CA, EVAL>
where
S: 'a + StateRead,
EVAL: VpEvaluator<'a, S, CA, EVAL>,
{
/// Evaluate a given validity predicate code with the given input data.
/// Currently, we can only evaluate VPs using WASM runner with WASM memory.
Expand All @@ -106,7 +104,6 @@ where
pub struct CtxPreStorageRead<'view, 'a, S, CA, EVAL>
where
S: StateRead,
EVAL: VpEvaluator<'a, S, CA, EVAL>,
{
/// The inner context
pub ctx: &'view Ctx<'a, S, CA, EVAL>,
Expand All @@ -118,7 +115,6 @@ where
pub struct CtxPostStorageRead<'view, 'a, S, CA, EVAL>
where
S: StateRead,
EVAL: VpEvaluator<'a, S, CA, EVAL>,
{
/// The inner context
pub ctx: &'view Ctx<'a, S, CA, EVAL>,
Expand Down

0 comments on commit 328c1ae

Please sign in to comment.