mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Memoize text width (#6552)
This commit is contained in:
parent
fa6bff0078
commit
5f59101811
14 changed files with 213 additions and 184 deletions
|
@ -8,7 +8,7 @@ pub struct FormatIdentifier;
|
|||
|
||||
impl FormatRule<Identifier, PyFormatContext<'_>> for FormatIdentifier {
|
||||
fn fmt(&self, item: &Identifier, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
source_text_slice(item.range(), ContainsNewlines::No).fmt(f)
|
||||
source_text_slice(item.range()).fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue