Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Müller <mich@elmueller.net>
  • Loading branch information
agryaznov and cmichi committed Apr 8, 2022
1 parent d1ec529 commit 5591d95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/env/src/engine/on_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,7 @@ impl TypedEnvBackend for EnvInstance {
let enc_account_id = scope.take_appended();

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

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

0 comments on commit 5591d95

Please sign in to comment.