mirror of https://github.com/eldruin/ds323x-rs
Simplify code
parent
eb87a741f6
commit
c7da098f80
|
@ -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>> {
|
||||
|
|
Loading…
Reference in New Issue