Skip to content

Commit 11a7235

Browse files
committed
clippy: fix minor error returning code style
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
1 parent 80071fd commit 11a7235

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,13 @@ where
345345
|archive_reader, _, mut entry| unsafe {
346346
loop {
347347
match ffi::archive_read_next_header(archive_reader, &mut entry) {
348-
ffi::ARCHIVE_EOF => Err(io::Error::new(
349-
io::ErrorKind::NotFound,
350-
format!("path {} doesn't exist inside archive", path),
351-
))?,
348+
ffi::ARCHIVE_EOF => {
349+
return Err(io::Error::new(
350+
io::ErrorKind::NotFound,
351+
format!("path {} doesn't exist inside archive", path),
352+
)
353+
.into())
354+
}
352355
value => archive_result(value, archive_reader)?,
353356
}
354357

0 commit comments

Comments
 (0)