Skip to content

Commit 3e12591

Browse files
committed
fix typespec for new/4
1 parent 99c7cd5 commit 3e12591

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a
66
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## 0.1.4 - 2021-07-06
10+
11+
### Fixed
12+
13+
- Fixed typespec for `Mint.WebSocket.new/4`
14+
915
## 0.1.3 - 2021-07-02
1016

1117
### Fixed

lib/mint/web_socket.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ defmodule Mint.WebSocket do
306306
Mint.WebSocket.new(conn, ref, status, resp_headers)
307307
```
308308
"""
309-
@spec new(Mint.HTTP.t(), reference(), pos_integer(), Mint.Types.headers()) ::
310-
{:ok, Mint.HTTP.t(), t(), [Mint.Types.response()]} | {:error, Mint.HTTP.t(), error()}
309+
@spec new(Mint.HTTP.t(), reference(), Mint.Types.status(), Mint.Types.headers()) ::
310+
{:ok, Mint.HTTP.t(), t()} | {:error, Mint.HTTP.t(), error()}
311311
def new(%Mint.HTTP1{} = conn, _request_ref, status, _response_headers)
312312
when status != 101 do
313313
{:error, conn, %WebSocketError{reason: :connection_not_upgraded}}

0 commit comments

Comments
 (0)