From 8dbdc5133cd212eeb2a8909bcda82271bc2aa577 Mon Sep 17 00:00:00 2001 From: moogle19 Date: Tue, 22 Feb 2022 10:56:33 +0100 Subject: [PATCH] Use `import Bitwise` instead of `use Bitwise` --- lib/protox/decode.ex | 2 +- lib/protox/encode.ex | 2 +- lib/protox/varint.ex | 2 +- lib/protox/zigzag.ex | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/protox/decode.ex b/lib/protox/decode.ex index d8b8a2fe..03c75400 100644 --- a/lib/protox/decode.ex +++ b/lib/protox/decode.ex @@ -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, diff --git a/lib/protox/encode.ex b/lib/protox/encode.ex index 271b3931..2bed0c01 100644 --- a/lib/protox/encode.ex +++ b/lib/protox/encode.ex @@ -4,7 +4,7 @@ defmodule Protox.Encode do """ import Protox.Guards - use Bitwise + import Bitwise use Protox.{ Float, diff --git a/lib/protox/varint.ex b/lib/protox/varint.ex index 9bb77d7b..7685cc83 100644 --- a/lib/protox/varint.ex +++ b/lib/protox/varint.ex @@ -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: <> diff --git a/lib/protox/zigzag.ex b/lib/protox/zigzag.ex index cc4c4670..f33beafc 100644 --- a/lib/protox/zigzag.ex +++ b/lib/protox/zigzag.ex @@ -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