Merge remote-tracking branch 'origin/feature/handle-exceptions' into feature/caller-replacement

This commit is contained in:
Omar Abdulla
2025-07-22 06:47:19 +03:00
2 changed files with 21 additions and 23 deletions
+16 -18
View File
@@ -18,6 +18,22 @@ pub struct Case {
}
impl Case {
pub fn inputs_iterator(&self) -> impl Iterator<Item = Input> {
let inputs_len = self.inputs.len();
self.inputs
.clone()
.into_iter()
.enumerate()
.map(move |(idx, mut input)| {
if idx + 1 == inputs_len {
input.expected = self.expected.clone();
input
} else {
input
}
})
}
pub fn handle_address_replacement(
&mut self,
old_to_new_mapping: &mut AddressReplacementMap,
@@ -37,21 +53,3 @@ define_wrapper_type!(
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
CaseIdx(usize);
);
impl Case {
pub fn inputs_iterator(&self) -> impl Iterator<Item = Input> {
let inputs_len = self.inputs.len();
self.inputs
.clone()
.into_iter()
.enumerate()
.map(move |(idx, mut input)| {
if idx + 1 == inputs_len {
input.expected = self.expected.clone();
input
} else {
input
}
})
}
}