From a0b5cc8ad59021d42496f4141b6562747db826e8 Mon Sep 17 00:00:00 2001 From: bigbluejay9 <2730943+bigbluejay9@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:26:24 +0700 Subject: [PATCH] Use ~c to represent charlist arg for connect/3 (#13837) Suppresses compiler warning about single quoted strings. ``` warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead ``` --- lib/elixir/pages/mix-and-otp/docs-tests-and-with.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir/pages/mix-and-otp/docs-tests-and-with.md b/lib/elixir/pages/mix-and-otp/docs-tests-and-with.md index 729f3ef52e8..f9c97c50330 100644 --- a/lib/elixir/pages/mix-and-otp/docs-tests-and-with.md +++ b/lib/elixir/pages/mix-and-otp/docs-tests-and-with.md @@ -371,7 +371,7 @@ defmodule KVServerTest do setup do opts = [:binary, packet: :line, active: false] - {:ok, socket} = :gen_tcp.connect('localhost', 4040, opts) + {:ok, socket} = :gen_tcp.connect(~c"localhost", 4040, opts) %{socket: socket} end