Get rid of Error::description()
This commit is contained in:
parent
7f5daa3c0e
commit
d3236903fc
2 changed files with 7 additions and 19 deletions
|
|
@ -22,12 +22,6 @@ pub enum SymbolRunError {
|
|||
}
|
||||
|
||||
impl Error for SymbolRunError {
|
||||
fn description(&self) -> &str {
|
||||
match self {
|
||||
Self::Symbol(_) => "Symbol execution error",
|
||||
Self::ExecuteDidNotReach(_) => "Target not reached after executing symbol",
|
||||
}
|
||||
}
|
||||
fn cause(&self) -> Option<&dyn Error> {
|
||||
match self {
|
||||
Self::Symbol(ref e) => Some(&**e),
|
||||
|
|
@ -40,7 +34,7 @@ impl fmt::Display for SymbolRunError {
|
|||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Self::Symbol(ref e) => write!(f, "{}", e),
|
||||
Self::ExecuteDidNotReach(_) => write!(f, "{}", self.description()),
|
||||
Self::ExecuteDidNotReach(_) => write!(f, "Target not reached after executing symbol"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue