Skip to content

Fix pin operator compile warnings - #44

Open
mitchellhenke wants to merge 1 commit into
dashbitco:masterfrom
mitchellhenke:fix-compile-warnings
Open

Fix pin operator compile warnings#44
mitchellhenke wants to merge 1 commit into
dashbitco:masterfrom
mitchellhenke:fix-compile-warnings

Conversation

@mitchellhenke

Copy link
Copy Markdown

There's a couple compile warnings on Elixir 1.20 for the pin operator, and this PR fixes them 😀

     warning: the variable "key_length" is accessed inside size(...) of a bitstring but it was defined outside of the match. You must precede it with the pin operator
     │
 275 │     <<_::size(key_length)-binary, _::4, offset::4>> = hmac
     │               ~
     │
     └─ lib/nimble_totp.ex:275:15: NimbleTOTP.hmac_truncate/1

     warning: the variable "offset" is accessed inside size(...) of a bitstring but it was defined outside of the match. You must precede it with the pin operator
     │
 276 │     <<_::size(offset)-binary, p::4-binary, _::binary>> = hmac
     │               ~
     │
     └─ lib/nimble_totp.ex:276:15: NimbleTOTP.hmac_truncate/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant