Use memchr to speedup newline search on x86 (#3985)
This commit is contained in:
@@ -9,9 +9,10 @@ use rustpython_parser::ast::{
|
||||
};
|
||||
use rustpython_parser::ConversionFlag;
|
||||
|
||||
use crate::newlines::LineEnding;
|
||||
use ruff_rustpython::vendor::{bytes, str};
|
||||
|
||||
use crate::source_code::stylist::{Indentation, LineEnding, Quote, Stylist};
|
||||
use crate::source_code::stylist::{Indentation, Quote, Stylist};
|
||||
|
||||
mod precedence {
|
||||
pub const ASSIGN: u8 = 3;
|
||||
@@ -1256,9 +1257,10 @@ impl<'a> Generator<'a> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::newlines::LineEnding;
|
||||
use rustpython_parser as parser;
|
||||
|
||||
use crate::source_code::stylist::{Indentation, LineEnding, Quote};
|
||||
use crate::source_code::stylist::{Indentation, Quote};
|
||||
use crate::source_code::Generator;
|
||||
|
||||
fn round_trip(contents: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user