mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-22 19:39:58 +00:00
Use a sorted vector for block comments (#9337)
## Summary I realized that we can avoid allocating a hash map here.
This commit is contained in:
parent
686abbc97a
commit
cea2ec8dd0
2 changed files with 4 additions and 6 deletions
|
@ -54,8 +54,8 @@ impl CommentRanges {
|
|||
/// own-line comments in which the comment hash (`#`) appears in the same
|
||||
/// column in each line, and at least one comment is non-empty.
|
||||
///
|
||||
/// Returns a vector containing the offset of the leading hash (`#`) for
|
||||
/// each comment in any block comment.
|
||||
/// Returns a sorted vector containing the offset of the leading hash (`#`)
|
||||
/// for each comment in any block comment.
|
||||
///
|
||||
/// ## Examples
|
||||
/// ```python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue