mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 05:51:03 -05:00
Pre-allocate output contents during autofix application (#2340)
This commit is contained in:
@@ -139,6 +139,14 @@ impl<'a> Locator<'a> {
|
||||
&self.contents[inner_end..outer_end],
|
||||
)
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.contents.len()
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.contents.is_empty()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user