miette/miette-derive/src
Nahor 75fea0935e
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.
2024-02-17 13:46:24 -08:00
..
code.rs fix(derive): elide lifetimes in derived functions (#226) 2022-11-21 09:51:10 -08:00
diagnostic.rs feat(deps): update to syn2 (#247) 2023-03-29 18:11:14 -07:00
diagnostic_arg.rs feat(derive): Add `#[diagnostic(forward(field_name), code(...))]` (#41) 2021-09-13 15:39:04 -07:00
diagnostic_source.rs feat(deps): update to syn2 (#247) 2023-03-29 18:11:14 -07:00
fmt.rs feat(deps): update to syn2 (#247) 2023-03-29 18:11:14 -07:00
forward.rs fix(derive): elide lifetimes in derived functions (#226) 2022-11-21 09:51:10 -08:00
help.rs feat(deps): update to syn2 (#247) 2023-03-29 18:11:14 -07:00
label.rs fix(label-collections): Label collection fixes and cleanup (#343) 2024-02-17 13:46:24 -08:00
lib.rs feat(diagnostic_source): add protocol method for Diagnostic-aware source chaining (#165) 2022-05-05 08:32:37 -07:00
related.rs feat(deps): update to syn2 (#247) 2023-03-29 18:11:14 -07:00
severity.rs feat(derive): Add `#[diagnostic(forward(field_name), code(...))]` (#41) 2021-09-13 15:39:04 -07:00
source_code.rs feat(derive): Allow optional sources in derive (#301) 2023-10-20 20:50:15 -07:00
url.rs fix(derive): elide lifetimes in derived functions (#226) 2022-11-21 09:51:10 -08:00
utils.rs fix(docs): Docs overhaul (#124) 2022-02-25 08:39:18 -08:00