Skip to content

fix(templated_uri): re-export data_privacy traits#476

Open
martintmk wants to merge 1 commit into
mainfrom
fix/templated-uri-reexport-data-privacy
Open

fix(templated_uri): re-export data_privacy traits#476
martintmk wants to merge 1 commit into
mainfrom
fix/templated-uri-reexport-data-privacy

Conversation

@martintmk
Copy link
Copy Markdown
Member

Macro-generated code now references RedactedDisplay and Redactor via the templated_uri re-export instead of data_privacy directly, so downstream crates using the templated macro no longer need a direct data_privacy dependency. This mirrors the existing http re-export.

Macro-generated code now references RedactedDisplay and Redactor via the templated_uri re-export instead of data_privacy directly, so downstream crates using the templated macro no longer need a direct data_privacy dependency. This mirrors the existing http re-export.
@martintmk martintmk marked this pull request as ready for review June 4, 2026 18:58
Copilot AI review requested due to automatic review settings June 4, 2026 18:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts templated_uri’s public surface to re-export the data_privacy traits that the templated proc-macro expansion relies on, so downstream crates using #[templated] don’t need to depend on data_privacy directly (mirroring the existing http re-export pattern).

Changes:

  • Re-export data_privacy::{RedactedDisplay, Redactor} from templated_uri (doc-hidden) for macro-generated code.
  • Update macro implementation to reference ::templated_uri::{RedactedDisplay, Redactor} rather than ::data_privacy::{...}.
  • Refresh macro expansion snapshots and align documentation imports accordingly.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/templated_uri/src/lib.rs Re-exports RedactedDisplay/Redactor (doc-hidden) to support macro-generated code without downstream data_privacy deps.
crates/templated_uri/src/_documentation/recipes.rs Drops direct import of RedactedDisplay from data_privacy in the docs module context.
crates/templated_uri_macros_impl/src/struct_template.rs Updates generated impls/UFCS calls to use ::templated_uri::{RedactedDisplay, Redactor}.
crates/templated_uri_macros_impl/src/enum_template.rs Updates generated impls to use ::templated_uri::{RedactedDisplay, Redactor}.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__templated_uri_impl.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__templated_unredacted_uri_impl.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__template_enum_impl.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__query_param_is_kv_expansion.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__optional_reference_field_codegen.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__optional_field_with_unredacted_codegen.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__optional_field_codegen.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__field_level_unredacted.snap Snapshot update reflecting new ::templated_uri trait paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (4b0c91b) to head (542b4f4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #476   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         319      319           
  Lines       24676    24676           
=======================================
  Hits        24676    24676           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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