mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Reduce exception copying
This commit is contained in:
@@ -146,9 +146,7 @@ impl StackFrameTrait for ArrayMappingFrame {
|
||||
panic!("Not appropriate for MapFrame")
|
||||
}
|
||||
|
||||
fn catch_exception(&mut self, _exception: Val) -> bool {
|
||||
return false;
|
||||
}
|
||||
fn catch_exception(&mut self, _exception: &mut Val) {}
|
||||
|
||||
fn clone_to_stack_frame(&self) -> StackFrame {
|
||||
Box::new(self.clone())
|
||||
|
||||
@@ -111,9 +111,7 @@ impl StackFrameTrait for ReduceFrame {
|
||||
panic!("Not appropriate for ReduceFrame")
|
||||
}
|
||||
|
||||
fn catch_exception(&mut self, _exception: Val) -> bool {
|
||||
return false;
|
||||
}
|
||||
fn catch_exception(&mut self, _exception: &mut Val) {}
|
||||
|
||||
fn clone_to_stack_frame(&self) -> StackFrame {
|
||||
Box::new(self.clone())
|
||||
|
||||
@@ -124,9 +124,7 @@ impl StackFrameTrait for ReduceRightFrame {
|
||||
panic!("Not appropriate for ReduceRightFrame")
|
||||
}
|
||||
|
||||
fn catch_exception(&mut self, _exception: Val) -> bool {
|
||||
false
|
||||
}
|
||||
fn catch_exception(&mut self, _exception: &mut Val) {}
|
||||
|
||||
fn clone_to_stack_frame(&self) -> StackFrame {
|
||||
Box::new(self.clone())
|
||||
|
||||
@@ -319,9 +319,7 @@ impl StackFrameTrait for SortFrame {
|
||||
panic!("Not appropriate for SortFrame")
|
||||
}
|
||||
|
||||
fn catch_exception(&mut self, _exception: Val) -> bool {
|
||||
false
|
||||
}
|
||||
fn catch_exception(&mut self, _exception: &mut Val) {}
|
||||
|
||||
fn clone_to_stack_frame(&self) -> StackFrame {
|
||||
Box::new(self.clone())
|
||||
|
||||
Reference in New Issue
Block a user