mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:25:42 +02:00
Add general refactorings (#3996)
This commit is contained in:
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user