Skip to content

Commit

Permalink
Fix use Bitwise warning (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
thanabodee-c authored Jul 26, 2022
1 parent 747fca4 commit 48c39d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/protobuf/wire/varint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule Protobuf.Wire.Varint do
iex> Protobuf.Wire.Varint.encode(1_234_567)
[<<135>>, <<173>>, 75]
"""
use Bitwise
import Bitwise

@max_bits 64
@mask64 bsl(1, @max_bits) - 1
Expand Down
2 changes: 1 addition & 1 deletion lib/protobuf/wire/zigzag.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Protobuf.Wire.Zigzag do
@moduledoc false

use Bitwise, skip_operators: true
import Bitwise

@spec encode(integer) :: integer
def encode(n) when n >= 0, do: n * 2
Expand Down

0 comments on commit 48c39d4

Please sign in to comment.