Remove unnecessary Box::new().

This commit is contained in:
Stephen Chung
2021-06-29 21:58:05 +08:00
parent 8b0299077b
commit bd35999b75
4 changed files with 28 additions and 27 deletions

View File

@@ -130,13 +130,9 @@ fn test_custom_syntax_raw() -> Result<(), Box<EvalAltResult>> {
1 => Ok(Some("$ident$".into())),
2 => match stream[1].as_str() {
"world" | "kitty" => Ok(None),
s => Err(ParseError(
Box::new(ParseErrorType::BadInput(LexError::ImproperSymbol(
s.to_string(),
Default::default(),
))),
Position::NONE,
)),
s => Err(LexError::ImproperSymbol(s.to_string(), Default::default())
.into_err(Position::NONE)
.into()),
},
_ => unreachable!(),
},