-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(label-collections): Label collection fixes and cleanup (#343)
* feat(collection): add label(collection) documentation to lib.rs * feat(collection): remove repeated formatting of label text Because of a typo, the label text was being formatted multiple times per label in a collection. With the fix, the text is formatted only once per collection * feat(collection): chain iterators rather than extend vector Since we are going to iterate anyway, instead of growing the label vector, chain the iterators. This should be more efficient. In some cases, this also remove a compilation warning about the label vector being unnecessarily mutable. * feat(collection): remove unnecessary `OptionalWrapper` - In a label collection, there is no need for a `None` label. One should just not add that label - Code wise it is also incorrect. The wrapper will be for a vector of spans, not for individual spans. It happens to work anyway, but this was not the intended use.
- Loading branch information
Showing
2 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters