File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,15 @@ impl ProgramCounter {
40
40
Ok ( ( ) )
41
41
}
42
42
43
- pub fn previous ( & mut self , offset : usize ) -> Result < ( ) , ProgramCounterError > {
43
+ pub fn previous (
44
+ & mut self ,
45
+ offset : usize ,
46
+ ) -> Result < ( ) , ProgramCounterError > {
44
47
if offset > self . current_op_code {
45
48
return Err ( ProgramCounterError :: OutOfBoundsError {
46
49
actual_len : self . current_op_codes . len ( ) ,
47
- requested_pos : ( self . current_op_code as isize ) - ( offset as isize ) ,
50
+ requested_pos : ( self . current_op_code as isize )
51
+ - ( offset as isize ) ,
48
52
} ) ;
49
53
}
50
54
self . current_op_code -= offset;
@@ -56,7 +60,7 @@ impl ProgramCounter {
56
60
if self . current_op_codes . len ( ) <= position {
57
61
return Err ( ProgramCounterError :: OutOfBoundsError {
58
62
actual_len : self . current_op_codes . len ( ) ,
59
- requested_pos : position,
63
+ requested_pos : position as isize ,
60
64
} ) ;
61
65
}
62
66
self . current_op_code = position;
You can’t perform that action at this time.
0 commit comments