eliminate lpop and use into_iter

This commit is contained in:
Shunsuke Shibayama 2022-12-25 20:22:03 +09:00
parent c59cace06b
commit 43a3fa6e30
2 changed files with 4 additions and 4 deletions

View file

@ -28,10 +28,10 @@ impl Reorderer {
}
}
pub fn reorder(mut self, mut ast: AST) -> Result<AST, TyCheckErrors> {
pub fn reorder(mut self, ast: AST) -> Result<AST, TyCheckErrors> {
log!(info "the reordering process has started.");
let mut new = vec![];
while let Some(chunk) = ast.module.lpop() {
for chunk in ast.module.into_iter() {
match chunk {
Expr::Def(def) => {
match def.body.block.first().unwrap() {