| 49 | |
| 50 | impl PartialEq for Error { |
| 51 | fn eq(&self, other: &Self) -> bool { |
| 52 | match (self, other) { |
| 53 | (Self::Trap(a), Self::Trap(b)) => a == b, |
| 54 | (Self::Linker(a), Self::Linker(b)) => a == b, |
| 55 | (Self::UnsupportedFeature(a), Self::UnsupportedFeature(b)) => a == b, |
| 56 | (Self::Other(a), Self::Other(b)) => a == b, |
| 57 | #[cfg(feature = "std")] |
| 58 | (Self::Io(a), Self::Io(b)) => a.kind() == b.kind(), |
| 59 | #[cfg(feature = "parser")] |
| 60 | (Self::Parser(a), Self::Parser(b)) => a == b, |
| 61 | (Self::Twasm(a), Self::Twasm(b)) => a == b, |
| 62 | _ => false, |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /// Errors that can occur when linking a WebAssembly module |