Skip to content

Commit 4559232

Browse files
authored
Update library/core/src/num/dec2flt/decimal_seq.rs
1 parent ebe6ace commit 4559232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/dec2flt/decimal_seq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl DecimalSeq {
157157
n = quotient;
158158
}
159159

160-
#[safety::loop_invariant(self.num_digits <= Self::MAX_DIGITS && self.decimal_point <= self.num_digits as i32 && prev(write_index) > 0)]
160+
#[safety::loop_invariant(self.num_digits <= Self::MAX_DIGITS && self.decimal_point <= self.num_digits as i32 && (write_index > 0 || prev(write_index) == 1))]
161161
while n > 0 {
162162
//true but hard to write proof with kani currently
163163
// kani::assume(write_index > 0);

0 commit comments

Comments
 (0)