Cargo fmt

This commit is contained in:
Leonora Tindall 2019-12-31 14:50:46 -08:00
parent d42b0ec6b3
commit acf059aa1a
Signed by: nora
GPG Key ID: 7A8B52EC67E09AAF
1 changed files with 13 additions and 11 deletions

View File

@ -243,7 +243,10 @@ impl Rn2903 {
fn transact_expecting(&mut self, command: &[u8], expectation: &[u8]) -> Result<()> {
let bytes = self.transact(command)?;
if bytes != expectation {
Err(Error::bad_response(bytes_to_string(expectation), bytes_to_string(&bytes)))
Err(Error::bad_response(
bytes_to_string(expectation),
bytes_to_string(&bytes),
))
} else {
Ok(())
}
@ -303,7 +306,6 @@ impl Rn2903 {
Ok(vec)
}
}
/// # System API Functions
@ -353,7 +355,7 @@ impl Rn2903 {
let val = bytes_to_string(&self.transact(b"mac pause")?);
let ms: u32 = match val.parse() {
Ok(v) => v,
Err(_) => return Err(Error::bad_response("<integer>", val))
Err(_) => return Err(Error::bad_response("<integer>", val)),
};
if ms == 0 {
Err(Error::CannotPause)