Fix clippy warnings

Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
Jacob Kiers 2023-10-04 22:13:49 +02:00
parent a574163aef
commit 9564fbed6e

View File

@ -142,7 +142,7 @@ mod tests {
let mut buf = [0u8; 2]; let mut buf = [0u8; 2];
let mut n = stream.read(&mut buf).await.unwrap(); let mut n = stream.read(&mut buf).await.unwrap();
while n > 0 { while n > 0 {
stream.write(b"hello").await.unwrap(); let _ = stream.write(b"hello").await.unwrap();
if buf.eq(b"by") { if buf.eq(b"by") {
stream.shutdown().await.unwrap(); stream.shutdown().await.unwrap();
break; break;
@ -172,8 +172,8 @@ mod tests {
.await .await
.unwrap(); .unwrap();
let mut buf = [0u8; 5]; let mut buf = [0u8; 5];
conn.write(b"hi").await.unwrap(); let _ = conn.write(b"hi").await.unwrap();
conn.read(&mut buf).await.unwrap(); let _ = conn.read(&mut buf).await.unwrap();
assert_eq!(&buf, b"hello"); assert_eq!(&buf, b"hello");
conn.shutdown().await.unwrap(); conn.shutdown().await.unwrap();
@ -183,8 +183,8 @@ mod tests {
.unwrap(); .unwrap();
let mut buf = [0u8; 1]; let mut buf = [0u8; 1];
for i in 0..=10u8 { for i in 0..=10u8 {
conn.write(&[i]).await.unwrap(); let _ = conn.write(&[i]).await.unwrap();
conn.read(&mut buf).await.unwrap(); let _ = conn.read(&mut buf).await.unwrap();
assert_eq!(&buf, &[i]); assert_eq!(&buf, &[i]);
} }
conn.shutdown().await.unwrap(); conn.shutdown().await.unwrap();