Use .into() instead of Box::new()

This commit is contained in:
Stephen Chung
2021-06-29 18:25:20 +08:00
parent 4143ef1e3f
commit 08828dd8c1
8 changed files with 64 additions and 75 deletions

View File

@@ -183,7 +183,7 @@ impl ParseErrorType {
#[inline(always)]
#[must_use]
pub(crate) fn into_err(self, pos: Position) -> ParseError {
ParseError(Box::new(self), pos)
ParseError(self.into(), pos)
}
}