Skip to content
Prev Previous commit
Next Next commit
cargo fmt
  • Loading branch information
SkymanOne committed Dec 24, 2022
commit d30c7b3321eda6ae9bdbf69ceb90b3cbfc67bdda
18 changes: 13 additions & 5 deletions crates/env/src/chain_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@

use crate::{
backend::EnvBackend,
engine::{EnvInstance, OnInstance},
engine::{
EnvInstance,
OnInstance,
},
};
use core::marker::PhantomData;

Expand Down Expand Up @@ -248,7 +251,10 @@ where
/// # }
/// ```
#[inline]
pub fn call(self, input: &I) -> Result<<O as IsResultType>::Ok, <O as IsResultType>::Err> {
pub fn call(
self,
input: &I,
) -> Result<<O as IsResultType>::Ok, <O as IsResultType>::Err> {
<EnvInstance as OnInstance>::on_instance(|instance| {
EnvBackend::call_chain_extension::<
I,
Expand Down Expand Up @@ -310,7 +316,10 @@ where
/// # }
/// ```
#[inline]
pub fn call(self, input: &I) -> Result<<O as IsResultType>::Ok, <O as IsResultType>::Err> {
pub fn call(
self,
input: &I,
) -> Result<<O as IsResultType>::Ok, <O as IsResultType>::Err> {
<EnvInstance as OnInstance>::on_instance(|instance| {
EnvBackend::call_chain_extension::<
I,
Expand All @@ -330,8 +339,7 @@ where
}
}

impl<I, O, ErrorCode>
ChainExtensionMethod<I, O, state::HandleErrorCode<ErrorCode>, false>
impl<I, O, ErrorCode> ChainExtensionMethod<I, O, state::HandleErrorCode<ErrorCode>, false>
where
I: scale::Encode,
O: scale::Decode,
Expand Down