| 1 | use std::error::Error; |
| 2 | use std::io; |
| 3 | |
| 4 | #[inline] |
| 5 | pub fn invalid_data_error(error: impl Into<Box<dyn Error + Send + Sync>>) -> io::Error { |
| 6 | io::Error::new(io::ErrorKind::InvalidData, error) |
| 7 | } |
| 8 | |
| 9 | #[inline] |
| 10 | pub fn invalid_input_error(error: impl Into<Box<dyn Error + Send + Sync>>) -> io::Error { |
| 11 | io::Error::new(io::ErrorKind::InvalidInput, error) |
| 12 | } |