Closed MOZGIII closed 5 years ago
I have a use case that requires error handling, however I currently have to do target-os dependent conditional compilation to properly handle errors on both linux and windows.
Here's a practical example:
#[cfg(not(target_os = "windows"))] fn is_no_such_var_error(err: &std::io::Error) -> bool { err.kind() == std::io::ErrorKind::NotFound } #[cfg(target_os = "windows")] fn is_no_such_var_error(err: &std::io::Error) -> bool { err.kind() == std::io::ErrorKind::Other && err.raw_os_error() == Some(203) }
I'd appreciate if you add support for unified error type for determining when the variable is not defined.
PS: I'm working on this, come take a look if you're interested.
:tada: This issue has been resolved in version 1.0.0 :tada:
The release is available on:
v1.0.0
Your semantic-release bot :package::rocket:
I have a use case that requires error handling, however I currently have to do target-os dependent conditional compilation to properly handle errors on both linux and windows.
Here's a practical example:
I'd appreciate if you add support for unified error type for determining when the variable is not defined.
PS: I'm working on this, come take a look if you're interested.