From 05c89ece92e3ae94ec78d09fa64cb53fab882561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sta=C5=84czak-Marikin?= Date: Wed, 29 May 2024 07:17:11 +0200 Subject: [PATCH] Silence some unused variable/import warnings --- lib/teiserver/bridge/command_lib.ex | 1 - lib/teiserver/protocols/spring/spring_system_in.ex | 2 -- lib/teiserver/protocols/spring/spring_telemetry_in.ex | 5 +++-- lib/teiserver_web/live/microblog/admin/post/show.ex | 1 - lib/teiserver_web/live/microblog/admin/tag/index.ex | 1 - lib/teiserver_web/live/microblog/admin/tag/show.ex | 1 - 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/teiserver/bridge/command_lib.ex b/lib/teiserver/bridge/command_lib.ex index 8034bc149..7332d0333 100644 --- a/lib/teiserver/bridge/command_lib.ex +++ b/lib/teiserver/bridge/command_lib.ex @@ -2,7 +2,6 @@ defmodule Teiserver.Bridge.CommandLib do @moduledoc """ """ - alias Teiserver.Data.Types, as: T require Logger @spec handle_command(Nostrum.Struct.Interaction.t(), map()) :: map() diff --git a/lib/teiserver/protocols/spring/spring_system_in.ex b/lib/teiserver/protocols/spring/spring_system_in.ex index be7c41230..c83271e6e 100644 --- a/lib/teiserver/protocols/spring/spring_system_in.ex +++ b/lib/teiserver/protocols/spring/spring_system_in.ex @@ -1,9 +1,7 @@ defmodule Teiserver.Protocols.Spring.SystemIn do @moduledoc false - alias Teiserver.Account.LoginThrottleServer alias Teiserver.Protocols.SpringIn - import Teiserver.Protocols.SpringOut, only: [reply: 5] require Logger @spec do_handle(String.t(), String.t(), String.t() | nil, Map.t()) :: Map.t() diff --git a/lib/teiserver/protocols/spring/spring_telemetry_in.ex b/lib/teiserver/protocols/spring/spring_telemetry_in.ex index 798710551..63e7ca3e7 100644 --- a/lib/teiserver/protocols/spring/spring_telemetry_in.ex +++ b/lib/teiserver/protocols/spring/spring_telemetry_in.ex @@ -156,12 +156,13 @@ defmodule Teiserver.Protocols.Spring.TelemetryIn do defp do_live_client_event(data, state) do if String.length(data) < 1024 do case Regex.run(~r/(\S+) (\S+)/u, data) do - [_, event_name, value64] -> + [_, _event_name, value64] -> case Spring.decode_value(value64) do - {:ok, value} -> + {:ok, _value} -> if state.userid do # TODO: Do stuff with live client events # Telemetry.log_live_client_event(state.userid, event_name, value) + # for now, they're prefixed with underscores to silence warnings :ok end diff --git a/lib/teiserver_web/live/microblog/admin/post/show.ex b/lib/teiserver_web/live/microblog/admin/post/show.ex index 46e0ec5fc..c98e3a7ed 100644 --- a/lib/teiserver_web/live/microblog/admin/post/show.ex +++ b/lib/teiserver_web/live/microblog/admin/post/show.ex @@ -2,7 +2,6 @@ defmodule TeiserverWeb.Microblog.Admin.PostLive.Show do @moduledoc false use TeiserverWeb, :live_view alias Teiserver.Microblog - import TeiserverWeb.MicroblogComponents @impl true def mount(_params, _session, socket) do diff --git a/lib/teiserver_web/live/microblog/admin/tag/index.ex b/lib/teiserver_web/live/microblog/admin/tag/index.ex index 965fca837..3557d46f7 100644 --- a/lib/teiserver_web/live/microblog/admin/tag/index.ex +++ b/lib/teiserver_web/live/microblog/admin/tag/index.ex @@ -2,7 +2,6 @@ defmodule TeiserverWeb.Microblog.Admin.TagLive.Index do @moduledoc false use TeiserverWeb, :live_view alias Teiserver.Microblog - import TeiserverWeb.MicroblogComponents @impl true def mount(_params, _session, socket) do diff --git a/lib/teiserver_web/live/microblog/admin/tag/show.ex b/lib/teiserver_web/live/microblog/admin/tag/show.ex index 54a0540bc..1f8ca4359 100644 --- a/lib/teiserver_web/live/microblog/admin/tag/show.ex +++ b/lib/teiserver_web/live/microblog/admin/tag/show.ex @@ -2,7 +2,6 @@ defmodule TeiserverWeb.Microblog.Admin.TagLive.Show do @moduledoc false use TeiserverWeb, :live_view alias Teiserver.Microblog - import TeiserverWeb.MicroblogComponents @impl true def mount(_params, _session, socket) do