From 7de1516885cf1eea08a82a06b2d3624955dd5fbc Mon Sep 17 00:00:00 2001 From: Mike Buhot Date: Thu, 24 Oct 2019 21:49:14 +1000 Subject: [PATCH] Fix dialyzer warnings for unmatched returns Simply suppressed by assigning to _ --- lib/ecto_job/migrations.ex | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ecto_job/migrations.ex b/lib/ecto_job/migrations.ex index d579e9a..4f28cca 100644 --- a/lib/ecto_job/migrations.ex +++ b/lib/ecto_job/migrations.ex @@ -95,12 +95,13 @@ defmodule EctoJob.Migrations do timestamps(timestamp_opts) end - case version do - 2 -> - create(index(name, [:schedule, :id])) - 3 -> - create(index(name, [:priority, :schedule, :id])) - end + _ = + case version do + 2 -> + create(index(name, [:schedule, :id])) + 3 -> + create(index(name, [:priority, :schedule, :id])) + end execute(""" CREATE TRIGGER tr_notify_inserted_#{name} @@ -147,7 +148,7 @@ defmodule EctoJob.Migrations do Rollback updates from job queue table with the given ecto job version and name. """ def down(3, name) do - drop(index(name, [:priority, :schedule, :id])) + _ = drop(index(name, [:priority, :schedule, :id])) alter table(name) do remove(:priority)