From 5ca43aa6f48fb9e75e024ac25e163c53e6edf02a Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Fri, 5 Jan 2024 13:28:28 +0000 Subject: [PATCH 1/3] Bump deps in mix.lock --- mix.lock | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 6a5c058..07afd83 100644 --- a/mix.lock +++ b/mix.lock @@ -1,2 +1,8 @@ -%{"earmark": {:hex, :earmark, "1.2.4", "99b637c62a4d65a20a9fb674b8cffb8baa771c04605a80c911c4418c69b75439", [:mix], [], "hexpm"}, - "ex_doc": {:hex, :ex_doc, "0.18.1", "37c69d2ef62f24928c1f4fdc7c724ea04aecfdf500c4329185f8e3649c915baf", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}} +%{ + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ex_doc": {:hex, :ex_doc, "0.31.0", "06eb1dfd787445d9cab9a45088405593dd3bb7fe99e097eaa71f37ba80c7a676", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5350cafa6b7f77bdd107aa2199fe277acf29d739aba5aee7e865fc680c62a110"}, + "makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.3", "d684f4bac8690e70b06eb52dad65d26de2eefa44cd19d64a8095e1417df7c8fd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "b78dc853d2e670ff6390b605d807263bf606da3c82be37f9d7f68635bd886fc9"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, +} From b4f12c14bf521abc4a4dffe40b2973c5e25bb397 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Fri, 5 Jan 2024 13:28:40 +0000 Subject: [PATCH 2/3] Fix a warning --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.exs b/config/config.exs index b263cdb..7455850 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 # This configuration is loaded before any dependency and is restricted # to this project. If another project depends on this project, this From 6d40cf9e565dbbd7c1b760677feccf8aff5e56e7 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Fri, 5 Jan 2024 13:28:58 +0000 Subject: [PATCH 3/3] Fix a warning warning: negative steps are not supported in Enum.slice/2, pass 0..-2//1 instead --- lib/happy_with.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/happy_with.ex b/lib/happy_with.ex index 9e95fce..215f666 100644 --- a/lib/happy_with.ex +++ b/lib/happy_with.ex @@ -38,7 +38,7 @@ defmodule HappyWith do defmacro happy_with([do: {:__block__, _, body}]), do: rewrite(body, nil) defp rewrite(body, elses) when length(body) > 1 do - exprs = Enum.slice(body, 0..-2) |> rewrite_tags + exprs = Enum.slice(body, 0..-2//1) |> rewrite_tags do_last = [do: Enum.at(body, -1)] else_clauses = elses && [else: elses] || [] {:with, [], exprs ++ [do_last ++ else_clauses]}