Add text_len() methods to more *Prefix enums in ruff_python_ast (#16254)

This commit is contained in:
Alex Waygood 2025-02-19 14:47:07 +00:00 committed by GitHub
parent 55ea09401a
commit f50849aeef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 1 deletions

View file

@ -1029,7 +1029,7 @@ pub trait StringFlags: Copy {
/// i.e., the length of the prefixes plus the length
/// of the quotes used to open the string.
fn opener_len(self) -> TextSize {
self.prefix().as_str().text_len() + self.quote_len()
self.prefix().text_len() + self.quote_len()
}
/// The total length of the string's closer.