difftreelog
perf reduce error enum size
in: master
2 files changed
crates/jrsonnet-evaluator/src/error.rsdiffbeforeafterboth1use crate::{builtin::format::FormatError, Val, ValType};1use crate::{builtin::format::FormatError, ValType};2use jrsonnet_parser::{BinaryOpType, ExprLocation, UnaryOpType};2use jrsonnet_parser::{BinaryOpType, ExprLocation, UnaryOpType};3use std::{path::PathBuf, rc::Rc};3use std::{path::PathBuf, rc::Rc};44181819 ArrayBoundsError(usize, usize),19 ArrayBoundsError(usize, usize),202021 AssertionFailed(Val),21 AssertionFailed(Rc<str>),222223 VariableIsNotDefined(String),23 VariableIsNotDefined(String),24 TypeMismatch(&'static str, Vec<ValType>, ValType),24 TypeMismatch(&'static str, Vec<ValType>, ValType),50 ImportSyntaxError {50 ImportSyntaxError {51 path: Rc<PathBuf>,51 path: Rc<PathBuf>,52 source_code: Rc<str>,52 source_code: Rc<str>,53 error: jrsonnet_parser::ParseError,53 error: Box<jrsonnet_parser::ParseError>,54 },54 },555556 RuntimeError(Rc<str>),56 RuntimeError(Rc<str>),crates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/lib.rs
+++ b/crates/jrsonnet-evaluator/src/lib.rs
@@ -155,7 +155,7 @@
},
)
.map_err(|error| ImportSyntaxError {
- error,
+ error: Box::new(error),
path,
source_code,
})?,