mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:09:22 +00:00
Use memchr
to speedup newline search on x86 (#3985)
This commit is contained in:
parent
f3e6ddda62
commit
e04ef42334
10 changed files with 147 additions and 114 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue