Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
notlesh committed Sep 29, 2024
1 parent ce02a53 commit d5930f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions vm/src/hint_processor/cairo_1_hint_processor/dict_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,20 @@ impl DictManagerExecScope {
if self.use_temporary_segments && self.trackers.len() > 1 {
let first_segment = self.trackers.get(0).unwrap();
if first_segment.start.segment_index < 0 {
return Err(HintError::CustomHint("First dict segment should not be temporary".to_string().into_boxed_str()));
return Err(HintError::CustomHint(
"First dict segment should not be temporary"
.to_string()
.into_boxed_str(),
));
}
let mut prev_end = first_segment.end.unwrap_or_default();
for tracker in &self.trackers[1..] {
if tracker.start.segment_index >= 0 {
return Err(HintError::CustomHint("Dict segment should be temporary".to_string().into_boxed_str()));
return Err(HintError::CustomHint(
"Dict segment should be temporary"
.to_string()
.into_boxed_str(),
));
}
vm.add_relocation_rule(tracker.start, prev_end)?;
prev_end += (tracker.end.unwrap_or_default() - tracker.start)?;
Expand Down

0 comments on commit d5930f2

Please sign in to comment.