diff --git a/Cargo.toml b/Cargo.toml index de1d68cf6..b0ec8eab2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sre-engine" -version = "0.4.3" +version = "0.5.0" authors = ["Kangzhi Shi ", "RustPython Team"] description = "A low-level implementation of Python's SRE regex engine" repository = "https://github.com/RustPython/sre-engine" diff --git a/src/engine.rs b/src/engine.rs index 5cf79ea14..5ee9af7d1 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -1,8 +1,6 @@ // good luck to those that follow; here be dragons -use crate::constants::SreInfo; - -use super::constants::{SreAtCode, SreCatCode, SreOpcode}; +use super::constants::{SreAtCode, SreCatCode, SreOpcode, SreInfo}; use super::MAXREPEAT; use optional::Optioned; use std::convert::TryFrom; @@ -284,7 +282,7 @@ fn _match(req: &Request, state: &mut State, ctx: MatchContext) - }; popped_result = 'result: loop { - let yield_ = 'context: loop { + let yielded = 'context: loop { match ctx.jump { Jump::OpCode => {} Jump::Assert1 => { @@ -864,7 +862,7 @@ fn _match(req: &Request, state: &mut State, ctx: MatchContext) - } }; context_stack.push(ctx); - context_stack.push(yield_); + context_stack.push(yielded); continue 'coro; }; }