• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

elixir-mint / mint_web_socket / 0c630f75d0a0f27ee337d7e1208abe15e8f20b22
89%

Build:
DEFAULT BRANCH: main
Ran 19 Jan 2026 05:25PM UTC
Jobs 1
Files 11
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Jan 2026 05:19PM UTC coverage: 88.579% (+0.1%) from 88.451%
0c630f75d0a0f27ee337d7e1208abe15e8f20b22

push

github

the-mikedavis
Fix Elixir 1.20.0-rc.0 warnings

Mainly this involves using the pin operator (`^`) in binary pattern
matches where the size is matched out of a binary.
`Mint.WebSocket.Frame.decode_opcode/1` is also refactored to pattern
match the map directly, resolving this warning:

     warning: incompatible types given to Map.fetch/2:

         Map.fetch(
           %{
             <<0::integer-size(4), ""::binary>> => :continuation,
             <<1::integer-size(4), ""::binary>> => :text,
             <<2::integer-size(4), ""::binary>> => :binary,
             <<8::integer-size(4), ""::binary>> => :close,
             <<9::integer-size(4), ""::binary>> => :ping,
             <<10::integer-size(4), ""::binary>> => :pong
           },
           opcode
         )

     the map:

         dynamic(%{bitstring() => :binary or :close or :continuation or :ping or :pong or :text})

     does not have all required keys:

         dynamic()

     therefore this function will always return :error

     where "opcode" was given the type:

         # type: dynamic()
         # from: lib/mint/web_socket/frame.ex:289:22
         opcode

     typing violation found at:
     │
 290 │     with :error <- Map.fetch(@reverse_opcodes, opcode) do
     │                        ~
     │
     └─ lib/mint/web_socket/frame.ex:290:24: Mint.WebSocket.Frame.decode_opcode/1

5 of 5 new or added lines in 2 files covered. (100.0%)

318 of 359 relevant lines covered (88.58%)

147779.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 0c630f75d0a0f27ee337d7e1208abe15e8f20b22.1 19 Jan 2026 05:25PM UTC 11
88.58
GitHub Action Run
Source Files on build 0c630f75d0a0f27ee337d7e1208abe15e8f20b22
  • Tree
  • List 11
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0c630f75 on github
  • Prev Build on main (#AB070D41...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc