Skip to content

Commit

Permalink
Revert "Apply suggestions from code review"
Browse files Browse the repository at this point in the history
This reverts commit 5591d95.
  • Loading branch information
agryaznov committed Apr 8, 2022
1 parent 5591d95 commit 12901dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/env/src/engine/on_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ impl TypedEnvBackend for EnvInstance {
let enc_account_id = scope.take_appended();

ext::code_hash(enc_account_id, output)?;
scale::Decode::decode(&mut &output[..])
let hash = scale::Decode::decode(&mut &output[..])?;
Ok(hash)
}

fn own_code_hash<E>(&mut self) -> Result<E::Hash>
Expand All @@ -532,6 +533,7 @@ impl TypedEnvBackend for EnvInstance {
{
let output = &mut self.scoped_buffer().take(32);
ext::own_code_hash(output);
scale::Decode::decode(&mut &output[..])
let hash = scale::Decode::decode(&mut &output[..])?;
Ok(hash)
}
}

0 comments on commit 12901dc

Please sign in to comment.