Skip to content

fix: restore const on UriSafeString::from_static#328

Merged
kate-shine merged 1 commit intomainfrom
u/kchuranov/fix-uri-safe-string-const-from-static
Mar 19, 2026
Merged

fix: restore const on UriSafeString::from_static#328
kate-shine merged 1 commit intomainfrom
u/kchuranov/fix-uri-safe-string-const-from-static

Conversation

@kate-shine
Copy link
Contributor

No description provided.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 14:47
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (d795ee1) to head (8062543).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #328   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         168      168           
  Lines       11903    11902    -1     
=======================================
- Hits        11903    11902    -1     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
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

Restores const support for UriSafeString::from_static so it can be used in compile-time contexts, and updates related examples/tests accordingly.

Changes:

  • Make UriSafeString::from_static a pub const fn.
  • Update unit test to validate from_static works in a const context.
  • Reformat the BaseUri::with_origin rustdoc example for readability.

Reviewed changes

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

File Description
crates/templated_uri/src/uri_safe.rs Restores const fn on from_static and updates the test to use a const value.
crates/templated_uri/src/base_uri.rs Reformats doctest example to a multi-line call style.

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

@kate-shine kate-shine enabled auto-merge (squash) March 19, 2026 14:53
@kate-shine kate-shine merged commit 1cf8d12 into main Mar 19, 2026
30 checks passed
@kate-shine kate-shine deleted the u/kchuranov/fix-uri-safe-string-const-from-static branch March 19, 2026 17:14
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.

4 participants