Address all occurrences of statement expression attributes

This commit is contained in:
Julien Cretin
2022-03-28 16:29:22 +02:00
parent 6e2f076e24
commit f862d4cc18
3 changed files with 15 additions and 21 deletions

View File

@@ -188,10 +188,8 @@ pub fn recv_with_timeout(
let result = recv_with_timeout_detail(buf, timeout_delay);
#[cfg(feature = "verbose_usb")]
{
if let Some(SendOrRecvStatus::Received) = result {
writeln!(Console::new(), "Received packet = {:02x?}", buf as &[u8]).unwrap();
}
if let Some(SendOrRecvStatus::Received) = result {
writeln!(Console::new(), "Received packet = {:02x?}", buf as &[u8]).unwrap();
}
result
@@ -216,10 +214,8 @@ pub fn send_or_recv_with_timeout(
let result = send_or_recv_with_timeout_detail(buf, timeout_delay);
#[cfg(feature = "verbose_usb")]
{
if let Some(SendOrRecvStatus::Received) = result {
writeln!(Console::new(), "Received packet = {:02x?}", buf as &[u8]).unwrap();
}
if let Some(SendOrRecvStatus::Received) = result {
writeln!(Console::new(), "Received packet = {:02x?}", buf as &[u8]).unwrap();
}
result