devinus / poison

An incredibly fast, pure Elixir JSON library
BSD Zero Clause License
2.03k stars 218 forks source link

Compiler warnings with Elixir v1.17.0-rc.0: single-quoted strings #222

Closed nathany-copia closed 4 months ago

nathany-copia commented 5 months ago

In addition to #214, the following warnings appear in Elixir 1.17:

==> poison
Compiling 4 files (.ex)
     warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead
     │
 180 │        when char <= 0x1F or char in '"\\' do
     │                                     ~
     │
     └─ lib/poison/encoder.ex:180:37
    warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead
    │
 77 │   whitespace = '\s\t\n\r'
    │                ~
    │
    └─ lib/poison/parser.ex:77:16
     warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead
     │
 355 │   for e <- 'eE' do
     │            ~
     │
     └─ lib/poison/parser.ex:355:12