Commit 261a6fa
committed
Handle invalid UTF-8 in label
I hadn't actually considered that `decodeUtf8` must be partial until stumbling across ndmitchell/hlint#1280.
It would actually be very odd for us to hit this in practice, so there's no need to do more sophisticated error handling. The string passed to `fail` will end up in a thrown `LifxError.DecodeFailure`.
The impossible case covers a deprecated constructor. When it is finally removed, we'll get a warning prompting us to remove the redundant wildcard.1 parent 4ff8a1a commit 261a6fa
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
| |||
0 commit comments