1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 10:44:07 +02:00

improve unwrapping custom binrw errors

This commit is contained in:
Robin Appelman 2022-12-23 23:20:52 +01:00
commit 46a03acd30

View file

@ -47,6 +47,7 @@ impl From<binrw::Error> for BspError {
// only a few error types should be generated by our code
match e {
Error::Backtrace(trace) => Self::from(*trace.error),
Error::Io(e) => BspError::IO(e),
Error::Custom { err, .. } => {
if err.is::<StringError>() {