Fix clippy warnings (#275)

This commit is contained in:
Gnome!
2025-05-05 13:58:15 +01:00
committed by GitHub
parent 64868e7213
commit 8956352f13
6 changed files with 18 additions and 17 deletions

View File

@@ -434,7 +434,7 @@ where
},
Err(e) => {
debug!("Read error {:?} {:?} {:?}.", e, out, raw_len);
out = Some(Err(IoError::new(IoErrorKind::Other, e)));
out = Some(Err(IoError::other(e)));
break;
},
}
@@ -472,7 +472,7 @@ where
// NOTE: use of raw_len here preserves true sample length even if
// stream is extended to 20ms boundary.
out.unwrap_or_else(|| Err(IoError::new(IoErrorKind::Other, "Unclear.")))
out.unwrap_or_else(|| Err(IoError::other("Unclear.")))
.map(|compressed_sz| {
self.audio_bytes
.fetch_add(raw_len * mem::size_of::<f32>(), Ordering::Release);

View File

@@ -132,8 +132,7 @@ impl HttpRequest {
});
let stream = Box::new(StreamReader::new(
resp.bytes_stream()
.map_err(|e| IoError::new(IoErrorKind::Other, e)),
resp.bytes_stream().map_err(IoError::other),
));
let input = HttpStream {