File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ features = [
3939
4040[dependencies ]
4141serde = { version = " 1.0" , features = [" derive" ], optional = true }
42- embedded-hal = { version = " =1.0.0-alpha.6 " , optional = true }
42+ embedded-hal = { version = " =1.0.0-alpha.7 " , optional = true }
4343nb = { version = " 1" , optional = true }
4444
4545[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ pub struct SerialError {
1313 kind : io:: ErrorKind ,
1414}
1515
16- // Implement serial::Error for SerialError
16+ // Implement ` serial::Error` for SerialError
1717impl serial:: Error for SerialError {
1818 fn kind ( & self ) -> serial:: ErrorKind {
1919 #[ allow( clippy:: match_single_binding) ]
@@ -30,9 +30,11 @@ fn io_error_to_nb(err: io::Error) -> nb::Error<SerialError> {
3030 }
3131}
3232
33- impl serial:: nb :: Read < u8 > for Box < dyn SerialPort > {
33+ impl serial:: ErrorType for Box < dyn SerialPort > {
3434 type Error = SerialError ;
35+ }
3536
37+ impl serial:: nb:: Read < u8 > for Box < dyn SerialPort > {
3638 fn read ( & mut self ) -> nb:: Result < u8 , Self :: Error > {
3739 let mut buffer = [ 0 ; 1 ] ;
3840 let bytes_read = io:: Read :: read ( self , & mut buffer) . map_err ( io_error_to_nb) ?;
@@ -45,8 +47,6 @@ impl serial::nb::Read<u8> for Box<dyn SerialPort> {
4547}
4648
4749impl serial:: nb:: Write < u8 > for Box < dyn SerialPort > {
48- type Error = SerialError ;
49-
5050 fn write ( & mut self , word : u8 ) -> nb:: Result < ( ) , Self :: Error > {
5151 io:: Write :: write ( self , & [ word] )
5252 . map_err ( io_error_to_nb)
You can’t perform that action at this time.
0 commit comments