-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
A-astArea - ASTArea - ASTC-cleanupCategory - technical debt or refactoring. Solution not expected to change behaviorCategory - technical debt or refactoring. Solution not expected to change behaviorgood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
#4045 replaced TriviasMap with a sorted Vec (bravo @lucab!)
After that change, there's no need to use a Vec<(u32, Comment)> - can change it to Vec<Comment> and move start field into Comment itself. Or, probably even better, make it struct Comment { span: Span, kind: CommentKind } to match AST nodes.
This would feel more natural to me - start was only external to Comment previously as it was key for the map.
Side note: I'm not sure if SortedComments should be a boxed slice rather than a Vec. Possible that some transforms may want to add/remove comments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-astArea - ASTArea - ASTC-cleanupCategory - technical debt or refactoring. Solution not expected to change behaviorCategory - technical debt or refactoring. Solution not expected to change behaviorgood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Type
Fields
Give feedbackPriority
None yet