Skip to content

Commit

Permalink
Remove unused mutable declaration
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Donald Kennedy <[email protected]>
  • Loading branch information
grkvlt committed Nov 7, 2017
1 parent 4d8194e commit 55d3f53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/rust/src/signing/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl Algorithm for Secp256k1Algorithm {
fn sign(&self, message: &[u8], key: &PrivateKey) -> Result<String, Error> {
let mut sha = Sha256::new();
sha.input(message);
let mut hash: &mut [u8] = & mut [0; 32];
let hash: &mut [u8] = & mut [0; 32];
sha.result(hash);

let sk = secp256k1::key::SecretKey::from_slice(&self.context, key.as_slice())?;
Expand All @@ -149,7 +149,7 @@ impl Algorithm for Secp256k1Algorithm {
fn verify(&self, signature: &str, message: &[u8], key: &PublicKey) -> Result<bool, Error> {
let mut sha = Sha256::new();
sha.input(message);
let mut hash: &mut [u8] = & mut [0; 32];
let hash: &mut [u8] = & mut [0; 32];
sha.result(hash);

let result = self.context.verify(
Expand Down

0 comments on commit 55d3f53

Please sign in to comment.