From 43ebd90685fc87d231467ad13c88d035046acdd8 Mon Sep 17 00:00:00 2001 From: Arnaldo Cesco Date: Wed, 22 Nov 2023 10:47:52 +0100 Subject: [PATCH] Charlists: write them in an Elixir 1.15-compatible way `mix format` now requires charlists to be written as `~c"charlist"` instead of `'charlist'`. Fix accordingly. Signed-off-by: Arnaldo Cesco --- lib/astarte_vmq_plugin.ex | 2 +- test/astarte_vmq_plugin/config_test.exs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/astarte_vmq_plugin.ex b/lib/astarte_vmq_plugin.ex index cb2edab..ab600a5 100644 --- a/lib/astarte_vmq_plugin.ex +++ b/lib/astarte_vmq_plugin.ex @@ -93,7 +93,7 @@ defmodule Astarte.VMQ.Plugin do [] end - mountpoint = '' + mountpoint = ~c"" subscriber_id = {mountpoint, client_id} case :vernemq_dev_api.disconnect_by_subscriber_id(subscriber_id, opts) do diff --git a/test/astarte_vmq_plugin/config_test.exs b/test/astarte_vmq_plugin/config_test.exs index 587a679..6d430df 100644 --- a/test/astarte_vmq_plugin/config_test.exs +++ b/test/astarte_vmq_plugin/config_test.exs @@ -22,7 +22,7 @@ defmodule Astarte.VMQ.Plugin.ConfigTest do alias Astarte.VMQ.Plugin.Config test "config init correctly converts amqp_options to elixir strings" do - opts = [username: 'user', password: 'password', virtual_host: '/'] + opts = [username: ~c"user", password: ~c"password", virtual_host: ~c"/"] old_opts = Config.amqp_options() @@ -40,7 +40,7 @@ defmodule Astarte.VMQ.Plugin.ConfigTest do end test "config init correctly converts data_queue_prefix to elixir string" do - data_queue_prefix = 'test_erlang_str' + data_queue_prefix = ~c"test_erlang_str" old_data_queue_prefix = Config.data_queue_prefix() @@ -55,7 +55,7 @@ defmodule Astarte.VMQ.Plugin.ConfigTest do end test "config init correctly converts cassandra_nodes to elixir string" do - erlang_cassandra_nodes = ['something'] + erlang_cassandra_nodes = [~c"something"] elixir_cassandra_nodes = ["something"]