Removes dead code

pull/190/head
Tpt 3 years ago
parent 18ec80c362
commit db4c4bcb97
  1. 19
      lib/src/error.rs

@ -1,25 +1,6 @@
use std::convert::Infallible;
use std::error::Error; use std::error::Error;
use std::io; use std::io;
/// Traits that allows unwrapping only infallible results
pub trait UnwrapInfallible {
type Value;
fn unwrap_infallible(self) -> Self::Value;
}
impl<T> UnwrapInfallible for Result<T, Infallible> {
type Value = T;
fn unwrap_infallible(self) -> T {
match self {
Ok(value) => value,
Err(error) => match error {},
}
}
}
pub fn invalid_data_error(error: impl Into<Box<dyn Error + Send + Sync>>) -> io::Error { pub fn invalid_data_error(error: impl Into<Box<dyn Error + Send + Sync>>) -> io::Error {
io::Error::new(io::ErrorKind::InvalidData, error) io::Error::new(io::ErrorKind::InvalidData, error)
} }

Loading…
Cancel
Save