Skip to content

Comments

Add track_caller to non-deprecated functions#1774

Merged
djc merged 3 commits intochronotope:mainfrom
svix-jplatte:jplatte/track_caller
Feb 13, 2026
Merged

Add track_caller to non-deprecated functions#1774
djc merged 3 commits intochronotope:mainfrom
svix-jplatte:jplatte/track_caller

Conversation

@svix-jplatte
Copy link
Contributor

@svix-jplatte svix-jplatte commented Feb 12, 2026

… that can panic because of invalid user input.

Closes #1773.

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.86%. Comparing base (f8900b5) to head (371e217).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1774   +/-   ##
=======================================
  Coverage   89.86%   89.86%           
=======================================
  Files          35       35           
  Lines       13769    13769           
=======================================
  Hits        12374    12374           
  Misses       1395     1395           

☔ 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.

let mut result = String::with_capacity(32);
write_rfc2822(&mut result, self.overflowing_naive_local(), self.offset.fix())
.expect("writing rfc2822 datetime to string should never fail");
.expect("date cannot be represented by RFC 2822");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't actually know whether the Panics documentation on this function or the previous expect message is correct - just implemented what seemed more likely to be correct.

@svix-jplatte
Copy link
Contributor Author

Also, happy to shorten the diff by removing the attribute again on all #[deprecated] functions, if you prefer.

@djc
Copy link
Member

djc commented Feb 12, 2026

Also, happy to shorten the diff by removing the attribute again on all #[deprecated] functions, if you prefer.

Yes, that might be nice.

Also, if you'd like this released, add a version bump commit?

@svix-jplatte svix-jplatte changed the title Fix panic message in to_rfc2822 Add track_caller to non-deprecated functions Feb 13, 2026
@djc djc merged commit c14b459 into chronotope:main Feb 13, 2026
35 checks passed
@svix-jplatte svix-jplatte deleted the jplatte/track_caller branch February 18, 2026 16:57
@svix-jplatte
Copy link
Contributor Author

@djc can you publish the release? (not that urgent but I think it's confusing with the version bump merged + not released)

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.

Add track_caller to panicking functions

2 participants