difftreelog
perf reduce error enum size
in: master
2 files changed
crates/jrsonnet-evaluator/src/error.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/error.rs
+++ b/crates/jrsonnet-evaluator/src/error.rs
@@ -1,4 +1,4 @@
-use crate::{builtin::format::FormatError, Val, ValType};
+use crate::{builtin::format::FormatError, ValType};
use jrsonnet_parser::{BinaryOpType, ExprLocation, UnaryOpType};
use std::{path::PathBuf, rc::Rc};
@@ -18,7 +18,7 @@
ArrayBoundsError(usize, usize),
- AssertionFailed(Val),
+ AssertionFailed(Rc<str>),
VariableIsNotDefined(String),
TypeMismatch(&'static str, Vec<ValType>, ValType),
@@ -50,7 +50,7 @@
ImportSyntaxError {
path: Rc<PathBuf>,
source_code: Rc<str>,
- error: jrsonnet_parser::ParseError,
+ error: Box<jrsonnet_parser::ParseError>,
},
RuntimeError(Rc<str>),
crates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth155 },155 },156 )156 )157 .map_err(|error| ImportSyntaxError {157 .map_err(|error| ImportSyntaxError {158 error,158 error: Box::new(error),159 path,159 path,160 source_code,160 source_code,161 })?,161 })?,