Commit ef20420
Merge #431
431: gpio: add ErrorKind. r=Dirbaio a=Dirbaio
This adds an `ErrorKind` to the GPIO `Error` associated type, just like all the other drivers. It has just a single `Other` variant for now.
The reason to have it is future-proofness: Even if we don't have ideas for ErrorKind variants for now, we might have them in the future.
- If we have `ErrorKind`, we can add more variants in the future backwards-compatibly after the 1.0 launch, thanks to `ErrorKind` being marked `#[non_exhaustive]`.
- If we *don't* have `ErrorKind`, adding it in the future would be a breaking change, because HALs would have to add support for it.
Co-authored-by: Dario Nieuwenhuis <[email protected]>2 files changed
+50
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
6 | 51 | | |
7 | 52 | | |
8 | 53 | | |
9 | 54 | | |
10 | | - | |
| 55 | + | |
11 | 56 | | |
12 | 57 | | |
13 | 58 | | |
14 | 59 | | |
15 | 60 | | |
| 61 | + | |
16 | 62 | | |
17 | 63 | | |
18 | 64 | | |
| |||
0 commit comments