Use into().

This commit is contained in:
Stephen Chung
2021-10-11 15:49:51 +08:00
parent 4908b58473
commit 90b6b15f15
4 changed files with 11 additions and 15 deletions

View File

@@ -299,7 +299,7 @@ impl fmt::Display for ParseError {
impl From<ParseErrorType> for Box<EvalAltResult> {
#[inline(always)]
fn from(err: ParseErrorType) -> Self {
Box::new(err.into())
err.into()
}
}
@@ -313,7 +313,7 @@ impl From<ParseErrorType> for EvalAltResult {
impl From<ParseError> for Box<EvalAltResult> {
#[inline(always)]
fn from(err: ParseError) -> Self {
Box::new(err.into())
err.into()
}
}