Deprecate From<EvalAltResult> for Result<T, Box<EvalAltResult>> because it is clearer for code to explicitly wrap errors in Err.
This commit is contained in:
@@ -19,12 +19,12 @@ impl<'a> StringSliceDeserializer<'a> {
|
||||
}
|
||||
/// Shortcut for a type conversion error.
|
||||
fn type_error<T>(&self) -> Result<T, Box<EvalAltResult>> {
|
||||
EvalAltResult::ErrorMismatchOutputType(
|
||||
Err(EvalAltResult::ErrorMismatchOutputType(
|
||||
type_name::<T>().into(),
|
||||
"string".into(),
|
||||
Position::NONE,
|
||||
)
|
||||
.into()
|
||||
.into())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user