Skip to content

Commit 214b7fd

Browse files
committed
fixups
1 parent 0d402ab commit 214b7fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netwatch/src/interfaces/bsd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ fn fetch_rib(af: i32, typ: RIBType, arg: i32) -> Result<Vec<u8>, RouteError> {
651651
)
652652
};
653653
if err != 0 {
654-
return Err(std::io::Error::last_os_error().into_error(IoSnafu { name: "sysctl" }));
654+
return Err(IoSnafu { name: "sysctl" }.into_error(std::io::Error::last_os_error()));
655655
}
656656
if n == 0 {
657657
// nothing available
@@ -677,7 +677,7 @@ fn fetch_rib(af: i32, typ: RIBType, arg: i32) -> Result<Vec<u8>, RouteError> {
677677
if io_err.raw_os_error().unwrap_or_default() == libc::ENOMEM && round < MAX_TRIES {
678678
continue;
679679
}
680-
return Err(io_err.into_error(IoSnafu { name: "sysctl" }));
680+
return Err(IoSnafu { name: "sysctl" }.into_error(io_err));
681681
}
682682
// Truncate b, to the new length
683683
b.truncate(n);

0 commit comments

Comments
 (0)