Creates an error with a message that might be displayed.
(_msg: &'static str)
| 9 | |
| 10 | /// Creates an error with a message that might be displayed. |
| 11 | pub fn error(_msg: &'static str) -> Error { |
| 12 | #[cfg(debug_assertions)] |
| 13 | return Error(Cow::Borrowed(_msg)); |
| 14 | #[cfg(not(debug_assertions))] |
| 15 | Error(()) |
| 16 | } |
| 17 | |
| 18 | /// Creates an error from a `T:` [`Display`]. |
| 19 | #[cfg(feature = "serde")] |
no test coverage detected