Commit 726b347
committed
Removes unreachable case in retrieving remote port value
The _ case would never match, as the previous clause would cover all cases being returned from Plug.Conn.get_peer_data(conn). The dialyzer warning:
```
lib/sentry/plug.ex:187: The variable _ can never match since previous clauses completely covered the type #{'address':={byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()}, 'port':=char(), 'ssl_cert':='nil' | binary()}
```
When removing that default case, the need for the case statement disappeared, and we can just fetch the remote port inline on LN174 instead.1 parent faac6c3 commit 726b347
1 file changed
+1
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | 182 | | |
193 | 183 | | |
194 | 184 | | |
| |||
0 commit comments