Commit caaf5da
committed
Stop requiring error kinds to impl Display
All kinds of `error::Error` now implements the `Display` trait,
and the `Display` for the `Error` itself is inherited.
The binding between the kind and `Display` is not necessary though.
In this commit I dropped the restriction of error kinds by `Display`,
and only implemented the trait for errors with displayable kinds.
As a result, the developer got 2 options:
- either to implement the `Display` for the kind (preferred),
- or implement it for the error only (but not for the kind) (edge case).1 parent 73e0aa2 commit caaf5da
1 file changed
+17
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
20 | | - | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | | - | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
67 | | - | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
78 | | - | |
| 88 | + | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
| |||
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
91 | | - | |
| 101 | + | |
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
| |||
0 commit comments