Skip to content

Commit a321154

Browse files
fix: use :erlang.bxor/2 instead of Bitwise.bxor/2 (#18)
* use :erlang.bxor/2 instead of Bitwise.bxor/2 * add change notes to changelog
1 parent 9e758d6 commit a321154

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ 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.2 - 2021-07-02
10+
11+
### Fixed
12+
13+
- Switch from using `Bitwise.bxor/2` to `:erlang.bxor/2` for compatibility
14+
with Elixir < 1.10
15+
916
## 0.1.1 - 2021-07-01
1017

1118
### Fixed

lib/mint/web_socket/frame.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ defmodule Mint.WebSocket.Frame do
156156
apply_mask(
157157
payload_rest,
158158
mask,
159-
<<acc::binary, Bitwise.bxor(mask_key, part_key)::integer-size(8)-unit(unquote(n))>>
159+
<<acc::binary, :erlang.bxor(mask_key, part_key)::integer-size(8)-unit(unquote(n))>>
160160
)
161161
end
162162
end

lib/mint/web_socket/per_message_deflate.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ defmodule Mint.WebSocket.PerMessageDeflate do
9090

9191
frame =
9292
Frame.unquote(opcode)(frame,
93-
reserved: <<Bitwise.bxor(reserved, 0b100)::size(3)>>,
93+
reserved: <<:erlang.bxor(reserved, 0b100)::size(3)>>,
9494
data: data
9595
)
9696

0 commit comments

Comments
 (0)