Skip to content

Commit

Permalink
Charlists: write them in an Elixir 1.15-compatible way
Browse files Browse the repository at this point in the history
`mix format` now requires charlists to be written as `~c"charlist"`
instead of `'charlist'`. Fix accordingly.

Signed-off-by: Arnaldo Cesco <[email protected]>
  • Loading branch information
Annopaolo committed Nov 22, 2023
1 parent 60d29be commit 43ebd90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/astarte_vmq_plugin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/astarte_vmq_plugin/config_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()

Expand All @@ -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"]

Expand Down

0 comments on commit 43ebd90

Please sign in to comment.