File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ pub trait Error: core::fmt::Debug {
5858 fn kind ( & self ) -> ErrorKind ;
5959}
6060
61+ impl Error for core:: convert:: Infallible {
62+ fn kind ( & self ) -> ErrorKind {
63+ match * self { }
64+ }
65+ }
66+
6167/// CAN error kind
6268///
6369/// This represents a common set of CAN operation errors. HAL implementations are
Original file line number Diff line number Diff line change @@ -107,6 +107,12 @@ pub trait Error: core::fmt::Debug {
107107 fn kind ( & self ) -> ErrorKind ;
108108}
109109
110+ impl Error for core:: convert:: Infallible {
111+ fn kind ( & self ) -> ErrorKind {
112+ match * self { }
113+ }
114+ }
115+
110116/// I2C error kind
111117///
112118/// This represents a common set of I2C operation errors. HAL implementations are
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ pub trait Error: core::fmt::Debug {
1313 fn kind ( & self ) -> ErrorKind ;
1414}
1515
16+ impl Error for core:: convert:: Infallible {
17+ fn kind ( & self ) -> ErrorKind {
18+ match * self { }
19+ }
20+ }
21+
1622/// Serial error kind
1723///
1824/// This represents a common set of serial operation errors. HAL implementations are
Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ pub trait Error: core::fmt::Debug {
6464 fn kind ( & self ) -> ErrorKind ;
6565}
6666
67+ impl Error for core:: convert:: Infallible {
68+ fn kind ( & self ) -> ErrorKind {
69+ match * self { }
70+ }
71+ }
72+
6773/// SPI error kind
6874///
6975/// This represents a common set of SPI operation errors. HAL implementations are
You can’t perform that action at this time.
0 commit comments