Skip to content

Commit 999dcfe

Browse files
torokati44kinetiknz
authored andcommitted
Make nightly clippy happy with std::io::Error::other
1 parent d137488 commit 999dcfe

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

mp4parse_capi/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,19 +442,15 @@ pub struct Mp4parseIo {
442442
impl Read for Mp4parseIo {
443443
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
444444
if buf.len() > isize::MAX as usize {
445-
return Err(std::io::Error::new(
446-
std::io::ErrorKind::Other,
445+
return Err(std::io::Error::other(
447446
"buf length overflow in Mp4parseIo Read impl",
448447
));
449448
}
450449
let rv = self.read.unwrap()(buf.as_mut_ptr(), buf.len(), self.userdata);
451450
if rv >= 0 {
452451
Ok(rv as usize)
453452
} else {
454-
Err(std::io::Error::new(
455-
std::io::ErrorKind::Other,
456-
"I/O error in Mp4parseIo Read impl",
457-
))
453+
Err(std::io::Error::other("I/O error in Mp4parseIo Read impl"))
458454
}
459455
}
460456
}

0 commit comments

Comments
 (0)