Skip to content

Commit a0ee100

Browse files
committed
Address linting feedback
HmacSha256::new_from_slice(&js_string_secret.as_bytes()) => HmacSha256::new_from_slice(js_string_secret.as_bytes()) No need to pass in address here. Same for js_string_message.
1 parent 34abc65 commit a0ee100

File tree

1 file changed

+2
-2
lines changed
  • crates/javy/src/apis/cryptox

1 file changed

+2
-2
lines changed

crates/javy/src/apis/cryptox/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ fn hmac_sha256(args: Args<'_>) -> Result<Value<'_>> {
5353
/// Create alias for HMAC-SHA256
5454
type HmacSha256 = Hmac<Sha256>;
5555

56-
let mut mac = HmacSha256::new_from_slice(&js_string_secret.as_bytes())
56+
let mut mac = HmacSha256::new_from_slice(js_string_secret.as_bytes())
5757
.expect("HMAC can take key of any size");
58-
mac.update(&js_string_message.as_bytes());
58+
mac.update(js_string_message.as_bytes());
5959

6060
let result = mac.finalize();
6161
let code_bytes = result.into_bytes();

0 commit comments

Comments
 (0)