Skip to content

Commit

Permalink
Fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Dec 18, 2024
1 parent 5177253 commit 43f9e6e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ impl Error {
pub fn raw_os_error(self) -> Option<RawOsError> {
let code = self.0.get();
if code < Self::INTERNAL_START {
RawOsError::try_from(code).ok().map(|errno| {
// On SOLID, negate the error code again to obtain the original error code.
if cfg!(target_os = "solid_asp3") {
-errno
} else {
errno
}
})
let res = RawOsError::try_from(code).ok();
// On SOLID, negate the error code again to obtain the original error code.
#[cfg(target_os = "solid_asp3")]
let res = res.map(|errno| -errno);
res
} else {
None
}
Expand Down

0 comments on commit 43f9e6e

Please sign in to comment.