Skip to content

Move the preformat functionality to a separate crate#148

Merged
TethysSvensson merged 1 commit into
mainfrom
tethys/preformat
May 21, 2026
Merged

Move the preformat functionality to a separate crate#148
TethysSvensson merged 1 commit into
mainfrom
tethys/preformat

Conversation

@TethysSvensson
Copy link
Copy Markdown
Contributor

@TethysSvensson TethysSvensson force-pushed the tethys/preformat branch 3 times, most recently from 107220a to d812dfc Compare May 21, 2026 13:11
@TethysSvensson TethysSvensson marked this pull request as ready for review May 21, 2026 13:13
@TethysSvensson TethysSvensson force-pushed the tethys/preformat branch 2 times, most recently from 955c3fb to e3f7aa3 Compare May 21, 2026 13:22
Comment thread examples/thiserror_interop.rs Outdated
Comment thread rootcause-preformat/src/preformatted.rs Outdated
@Kile-Asmussen
Copy link
Copy Markdown
Contributor

Other than a few nitpicks, this looks solid. I especially like simplifying the hook code.

@TethysSvensson TethysSvensson added this pull request to the merge queue May 21, 2026
@TethysSvensson TethysSvensson removed this pull request from the merge queue due to a manual request May 21, 2026
@TethysSvensson TethysSvensson enabled auto-merge May 21, 2026 15:05
@TethysSvensson TethysSvensson added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit ff521b9 May 21, 2026
14 checks passed
@TethysSvensson TethysSvensson deleted the tethys/preformat branch May 21, 2026 15:13
TethysSvensson added a commit that referenced this pull request May 21, 2026
- examples/context_methods.rs: update stale `println!` label that still
  said "Using context_transform_nested():"; the code now uses clone +
  `context()`. Also updated the related `context_to()` comment.
- rootcause-preformat/README.md: license links pointed at
  ../LICENSE-APACHE / ../LICENSE-MIT, which 404 once published. Use
  in-crate paths instead.
- rootcause-preformat: add unit tests for `PreformatRootExt`,
  `ContextTransformNestedExt` (both `Report` and `Result` impls), and
  `PreformatAttachmentExt` (owned/ref/mut).
nicklaswj pushed a commit to nicklaswj/rootcause that referenced this pull request May 21, 2026
…-rs#183)

* Polish follow-up to rootcause-rs#148 (rootcause-preformat)

- examples/context_methods.rs: update stale `println!` label that still
  said "Using context_transform_nested():"; the code now uses clone +
  `context()`. Also updated the related `context_to()` comment.
- rootcause-preformat/README.md: license links pointed at
  ../LICENSE-APACHE / ../LICENSE-MIT, which 404 once published. Use
  in-crate paths instead.
- rootcause-preformat: add unit tests for `PreformatRootExt`,
  `ContextTransformNestedExt` (both `Report` and `Result` impls), and
  `PreformatAttachmentExt` (owned/ref/mut).

* cargo fmt
TethysSvensson added a commit to Kile-Asmussen/rootcause-work-fork that referenced this pull request May 21, 2026
The Conversions sub-list in ResultExt mentioned a method
(context_transform_nested) and a type (PreformattedContext) that live in
the rootcause-preformat crate, not on ResultExt. Drop the bullet pointing
at them and reshape the surviving context_to/context_transform entries
into the same one-line-per-category style used by the rest of the list.

Also add rootcause-preformat (introduced in rootcause-rs#148) to the Ecosystem list
in the crate root, since the PR's own goal is to keep these overview
lists in sync with what is actually implemented.
TethysSvensson added a commit to mkatychev/rootcause that referenced this pull request May 21, 2026
- CHANGELOG: drop stale `display_preformatted`/`debug_preformatted`
  references and tighten the entry (those methods were removed in rootcause-rs#148).
- `ReportAttachmentRef::format_inner_with_parent`: bring docs up to par
  with `format_inner` / `format_inner_unhooked`, including an example.
- `AttachmentParent.attachment_index`: document the pre-sort, pre-filter
  convention that `DefaultReportFormatter` upholds.
- `tests/attachment_parent.rs`: extend coverage to `Appendix` placement.
- Rename the leftover `style1` binding to `style`.
yonas pushed a commit to yonasBSD/rootcause that referenced this pull request May 26, 2026
…verview lists. (rootcause-rs#153)

* Small changes

* Fix broken intra-doc links and add rootcause-preformat to Ecosystem list

The Conversions sub-list in ResultExt mentioned a method
(context_transform_nested) and a type (PreformattedContext) that live in
the rootcause-preformat crate, not on ResultExt. Drop the bullet pointing
at them and reshape the surviving context_to/context_transform entries
into the same one-line-per-category style used by the rest of the list.

Also add rootcause-preformat (introduced in rootcause-rs#148) to the Ecosystem list
in the crate root, since the PR's own goal is to keep these overview
lists in sync with what is actually implemented.

* Remove speculative "More to come" entry from Ecosystem list

* Review nits: reorder ResultExt categories, drop duplicate ref, polish wording

---------

Co-authored-by: Tethys Svensson <freaken@freaken.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants