Simplify code

pull/4/head
Diego Barrios Romero 2018-11-16 19:12:36 +01:00
parent eb87a741f6
commit c7da098f80
1 changed files with 2 additions and 4 deletions

View File

@ -123,10 +123,8 @@ where
.transfer(&mut data) .transfer(&mut data)
.map_err(Error::Comm); .map_err(Error::Comm);
self.cs.set_high(); self.cs.set_high();
match result { let result = result?;
Ok(result) => Ok(result[1]), Ok(result[1])
Err(e) => Err(e)
}
} }
fn read_data(&mut self, mut payload: &mut [u8]) -> Result<(), Error<Self::Error>> { fn read_data(&mut self, mut payload: &mut [u8]) -> Result<(), Error<Self::Error>> {