Skip to content

Commit

Permalink
Remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone authored Mar 30, 2024
1 parent 57e7f4d commit 34ffa93
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions vm/src/stdlib/sre.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,27 +435,6 @@ mod _sre {
FilterType::Literal(repl)
}
};
// };
// Self::with_bytes(&repl, vm, |x| Ok(x.contains(&b'\\')))?
// || Self::with_str(&repl, vm, |x| Ok(x.contains('\\')))?
// {
// FilterType::Template(Template::compile(zelf.clone(), repl, vm)?)
// } else {
// FilterType::Literal(repl)
// };

// let (is_callable, filter) = if repl.is_callable() {
// (true, repl)
// } else {
// if is_template {
// let re = vm.import("re", None, 0)?;
// let func = re.get_attr("_compile_template", vm)?;
// let filter = func.call((zelf.clone(), repl), vm)?;
// (filter.is_callable(), filter)
// } else {
// (false, repl)
// }
// };

with_sre_str!(zelf, &string, vm, |s| {
let req = s.create_request(&zelf, 0, usize::MAX);
Expand Down Expand Up @@ -492,13 +471,6 @@ mod _sre {
}
};

// if is_callable {
// let m = Match::new(&iter.state, zelf.clone(), string.clone());
// let ret = filter.call((m.into_ref(&vm.ctx),), vm)?;
// sublist.push(ret);
// } else {
// sublist.push(filter.clone());
// }

last_pos = iter.state.cursor.position;
n += 1;
Expand Down

0 comments on commit 34ffa93

Please sign in to comment.