Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid heap allocations with session id #159

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

maxcountryman
Copy link
Owner

Here we've revisited our implementations of Display and FromStr for Id and updated them to leverage the stack via slices.

Technically this is a breaking change because we've also updated the IdError.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 71.37%. Comparing base (8159225) to head (f408d87).

Files Patch % Lines
tower-sessions-core/src/session.rs 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
+ Coverage   71.32%   71.37%   +0.05%     
==========================================
  Files           5        5              
  Lines         279      283       +4     
==========================================
+ Hits          199      202       +3     
- Misses         80       81       +1     

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

Here we've revisited our implementations of `Display` and `FromStr` for
`Id` and updated them to leverage the stack via slices.

Technically this is a breaking change because we've also updated the
`IdError`.
This takes advantage of the recent update to the base64 crate.

We've also removed our custom error type in favor of using the base64
error type directly.
@maxcountryman maxcountryman merged commit ee4bc22 into main Mar 5, 2024
7 checks passed
@maxcountryman maxcountryman deleted the session-id-stack-allocation branch March 5, 2024 01:01
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.

1 participant