Skip to content

Commit

Permalink
use truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Oct 5, 2023
1 parent c79d6e2 commit 71afceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/proc/constant_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ impl<'a> ConstantEvaluator<'a> {
for (a, b) in first.iter_mut().zip(&*last) {
*a = self.math_pow(*a, *b, span)?;
}
components.drain(mid..);
components.truncate(mid);

Expression::Compose {
ty: ty0,
Expand Down Expand Up @@ -648,7 +648,7 @@ impl<'a> ConstantEvaluator<'a> {
for ((e, low), high) in es.iter_mut().zip(lows).zip(highs) {
*e = self.math_clamp(*e, *low, *high, span)?;
}
components.drain(chunk_size..);
components.truncate(chunk_size);

Expression::Compose {
ty: ty0,
Expand Down

0 comments on commit 71afceb

Please sign in to comment.