Skip to content

Commit

Permalink
Optimize generics declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig committed Aug 14, 2023
1 parent f2e197d commit eb9025b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
7 changes: 5 additions & 2 deletions examples/demo-stf/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ impl<C: Context, Cond: ValidityCondition> SlotHooks<Cond> for Runtime<C> {
}
}

impl<C: Context, Cond: ValidityCondition, B: BlobReaderTrait>
sov_modules_stf_template::Runtime<C, Cond, B> for Runtime<C>
impl<C, Cond, B> sov_modules_stf_template::Runtime<C, Cond, B> for Runtime<C>
where
C: Context,
Cond: ValidityCondition,
B: BlobReaderTrait,
{
}
6 changes: 4 additions & 2 deletions module-system/sov-modules-stf-template/src/app_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ impl<A: AddressTrait> From<ApplyBatchError<A>> for BatchReceipt<SequencerOutcome
}
}

impl<C: Context, Vm, Cond: ValidityCondition, RT: Runtime<C, Cond, B>, B: BlobReaderTrait>
AppTemplate<C, Cond, Vm, RT, B>
impl<C, Vm, Cond, RT, B> AppTemplate<C, Cond, Vm, RT, B>
where
C: Context,
Cond: ValidityCondition,
B: BlobReaderTrait,
RT: Runtime<C, Cond, B>,
{
/// [`AppTemplate`] constructor.
Expand Down
7 changes: 5 additions & 2 deletions module-system/sov-modules-stf-template/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ pub enum SlashingReason {
InvalidTransactionEncoding,
}

impl<C: Context, RT, Vm: Zkvm, Cond: ValidityCondition, B: BlobReaderTrait>
AppTemplate<C, Cond, Vm, RT, B>
impl<C, RT, Vm, Cond, B> AppTemplate<C, Cond, Vm, RT, B>
where
C: Context,
Vm: Zkvm,
Cond: ValidityCondition,
B: BlobReaderTrait,
RT: Runtime<C, Cond, B>,
{
fn begin_slot(
Expand Down

0 comments on commit eb9025b

Please sign in to comment.