chore(clippy): run linter
This commit is contained in:
@@ -35,10 +35,10 @@ impl<T: ADBMessageTransport> Write for MessageWriter<T> {
|
||||
Ok(response) => {
|
||||
response
|
||||
.assert_command(MessageCommand::Okay)
|
||||
.map_err(|e| Error::new(ErrorKind::Other, e))?;
|
||||
.map_err(Error::other)?;
|
||||
Ok(buf.len())
|
||||
}
|
||||
Err(e) => Err(Error::new(ErrorKind::Other, e)),
|
||||
Err(e) => Err(Error::other(e)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,18 +42,15 @@ impl<R: Read> Read for ADBRecvCommandReader<R> {
|
||||
let mut error_msg = vec![0; length];
|
||||
self.inner.read_exact(&mut error_msg)?;
|
||||
|
||||
Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
format!(
|
||||
"ADB request failed: {}",
|
||||
String::from_utf8_lossy(&error_msg)
|
||||
),
|
||||
))
|
||||
Err(std::io::Error::other(format!(
|
||||
"ADB request failed: {}",
|
||||
String::from_utf8_lossy(&error_msg)
|
||||
)))
|
||||
}
|
||||
_ => Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
format!("Unknown response from device {:#?}", header),
|
||||
)),
|
||||
_ => Err(std::io::Error::other(format!(
|
||||
"Unknown response from device {:#?}",
|
||||
header
|
||||
))),
|
||||
}
|
||||
} else {
|
||||
// Computing minimum to ensure to stop reading before next header...
|
||||
|
||||
Reference in New Issue
Block a user