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)
.map_err(Error::Comm);
self.cs.set_high();
match result {
Ok(result) => Ok(result[1]),
Err(e) => Err(e)
}
let result = result?;
Ok(result[1])
}
fn read_data(&mut self, mut payload: &mut [u8]) -> Result<(), Error<Self::Error>> {