Skip to content

Commit

Permalink
Use import Bitwise instead of use Bitwise
Browse files Browse the repository at this point in the history
  • Loading branch information
moogle19 authored and ahamez committed Feb 22, 2022
1 parent b0efbce commit 8dbdc51
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/protox/decode.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Protox.Decode do
@moduledoc false
# Helpers decoding functions that will be used by the generated code.

use Bitwise
import Bitwise

use Protox.{
Float,
Expand Down
2 changes: 1 addition & 1 deletion lib/protox/encode.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Protox.Encode do
"""

import Protox.Guards
use Bitwise
import Bitwise

use Protox.{
Float,
Expand Down
2 changes: 1 addition & 1 deletion lib/protox/varint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Protox.Varint do
@moduledoc false
# Internal. Implement LEB128 compression.

use Bitwise
import Bitwise

@spec encode(integer) :: iodata
def encode(v) when v < 128, do: <<v>>
Expand Down
2 changes: 1 addition & 1 deletion lib/protox/zigzag.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Protox.Zigzag do
@moduledoc false
# Internal. Map integers to positive integers as LEB128 can only work on the latters.

use Bitwise
import Bitwise

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

0 comments on commit 8dbdc51

Please sign in to comment.