()
| 147 | |
| 148 | #[test] |
| 149 | fn error_trait() { |
| 150 | // Delegates to I/O Error. |
| 151 | let err = Error(WriteError(io::Error::new(io::ErrorKind::Other, "unexpected EOF"))); |
| 152 | |
| 153 | fn test<E: error::Error>(err: E) { |
| 154 | assert_eq!("error while writing MessagePack'ed value", err.description()); |
| 155 | assert!(err.cause().is_some()); |
| 156 | assert_eq!("unexpected EOF", err.cause().unwrap().description()); |
| 157 | } |
| 158 | |
| 159 | test(err); |
| 160 | } |
| 161 | } |
nothing calls this directly
no test coverage detected