From 448e224d86690bc4e1e601719149aad315321356 Mon Sep 17 00:00:00 2001 From: VitorTrin Date: Mon, 4 Dec 2023 16:12:14 -0300 Subject: [PATCH] fix deprecation warnings --- config/config.exs | 2 +- lib/kayrock/error_code.ex | 2 +- lib/kayrock/message_set.ex | 2 +- lib/kayrock/record_batch.ex | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.exs b/config/config.exs index 2357f59..1412799 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,6 +1,6 @@ # This file is responsible for configuring your application # and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config config :kayrock, connection_opts: [ diff --git a/lib/kayrock/error_code.ex b/lib/kayrock/error_code.ex index 8f4cf34..a34ca34 100644 --- a/lib/kayrock/error_code.ex +++ b/lib/kayrock/error_code.ex @@ -67,7 +67,7 @@ defmodule Kayrock.ErrorCode do end def code_to_atom(code) do - Logger.warn("Unknown error code #{inspect(code)}") + Logger.warning("Unknown error code #{inspect(code)}") :unknown end diff --git a/lib/kayrock/message_set.ex b/lib/kayrock/message_set.ex index 7e0aadf..862206f 100644 --- a/lib/kayrock/message_set.ex +++ b/lib/kayrock/message_set.ex @@ -27,7 +27,7 @@ defmodule Kayrock.MessageSet do @type t :: %__MODULE__{} end - use Bitwise + import Bitwise defstruct messages: [], magic: 0 diff --git a/lib/kayrock/record_batch.ex b/lib/kayrock/record_batch.ex index ea6d8aa..51dec63 100644 --- a/lib/kayrock/record_batch.ex +++ b/lib/kayrock/record_batch.ex @@ -60,7 +60,7 @@ defmodule Kayrock.RecordBatch do @type t :: %__MODULE__{} - use Bitwise + import Bitwise alias Kayrock.Compression alias Kayrock.MessageSet