Skip to content

Commit

Permalink
Use ~c to represent charlist arg for connect/3 (#13837)
Browse files Browse the repository at this point in the history
Suppresses compiler warning about single quoted strings.

```
warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead
```
  • Loading branch information
bigbluejay9 authored Sep 18, 2024
1 parent f6856cf commit a0b5cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elixir/pages/mix-and-otp/docs-tests-and-with.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a0b5cc8

Please sign in to comment.