From e800c020ab034e24afe27df4991bb360c0b86f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=96R=C3=96K=20Attila?= Date: Thu, 17 Apr 2025 01:23:33 +0200 Subject: [PATCH] Make nightly clippy happy with std::io::Error::other --- mp4parse_capi/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mp4parse_capi/src/lib.rs b/mp4parse_capi/src/lib.rs index a5001544..3f7f5f1e 100644 --- a/mp4parse_capi/src/lib.rs +++ b/mp4parse_capi/src/lib.rs @@ -442,8 +442,7 @@ pub struct Mp4parseIo { impl Read for Mp4parseIo { fn read(&mut self, buf: &mut [u8]) -> std::io::Result { if buf.len() > isize::MAX as usize { - return Err(std::io::Error::new( - std::io::ErrorKind::Other, + return Err(std::io::Error::other( "buf length overflow in Mp4parseIo Read impl", )); } @@ -451,8 +450,7 @@ impl Read for Mp4parseIo { if rv >= 0 { Ok(rv as usize) } else { - Err(std::io::Error::new( - std::io::ErrorKind::Other, + Err(std::io::Error::other( "I/O error in Mp4parseIo Read impl", )) }