Add general refactorings (#3996)

This commit is contained in:
Marcin Puc
2021-09-10 00:44:22 +02:00
committed by GitHub
parent ae9f4135c0
commit 51c74eebd0
165 changed files with 540 additions and 615 deletions

View File

@ -871,25 +871,25 @@ impl std::error::Error for ShellError {}
impl std::convert::From<Box<dyn std::error::Error>> for ShellError {
fn from(input: Box<dyn std::error::Error>) -> ShellError {
ShellError::untagged_runtime_error(format!("{}", input))
ShellError::untagged_runtime_error(input.to_string())
}
}
impl std::convert::From<std::io::Error> for ShellError {
fn from(input: std::io::Error) -> ShellError {
ShellError::untagged_runtime_error(format!("{}", input))
ShellError::untagged_runtime_error(input.to_string())
}
}
impl std::convert::From<std::string::FromUtf8Error> for ShellError {
fn from(input: std::string::FromUtf8Error) -> ShellError {
ShellError::untagged_runtime_error(format!("{}", input))
ShellError::untagged_runtime_error(input.to_string())
}
}
impl std::convert::From<std::str::Utf8Error> for ShellError {
fn from(input: std::str::Utf8Error) -> ShellError {
ShellError::untagged_runtime_error(format!("{}", input))
ShellError::untagged_runtime_error(input.to_string())
}
}