Skip to content

Commit

Permalink
CairoPieValidation to #[error(transparent)] (#1761)
Browse files Browse the repository at this point in the history
* CairoPieValidation #[error(transparent)]

* Add warning

---------

Co-authored-by: Pedro Fontana <[email protected]>
  • Loading branch information
pefontana and Pedro Fontana authored May 10, 2024
1 parent 9ef2ab8 commit f87be4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vm/src/vm/errors/cairo_run_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use crate::types::errors::program_errors::ProgramError;
use crate::vm::errors::{
runner_errors::RunnerError, trace_errors::TraceError, vm_errors::VirtualMachineError,
};

// In case you need to add a CairoRunError enum variant
// Add it with #[error(transparent)]
// If not it can cause some performance regressions, like in https://github.com/lambdaclass/cairo-vm/pull/1720
#[derive(Debug, Error)]
pub enum CairoRunError {
#[error(transparent)]
Expand All @@ -22,6 +24,6 @@ pub enum CairoRunError {
MemoryError(#[from] MemoryError),
#[error(transparent)]
VmException(#[from] VmException),
#[error("Cairo Pie validation failed: {0}")]
#[error(transparent)]
CairoPieValidation(#[from] CairoPieValidationError),
}

0 comments on commit f87be4d

Please sign in to comment.