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

Simplify client, remove some allocations #528

Merged
merged 3 commits into from
Apr 6, 2024

Conversation

mzeitlin11
Copy link
Collaborator

After the big PR in, excited for a small, self-contained PR with some small tweaks I didn't want to mix with everything else

@@ -138,22 +137,24 @@ struct Signature<'r> {

impl<'r> Signature<'r> {
fn parse(raw: &'r str) -> Result<Signature<'r>, WebhookError> {
let headers: HashMap<&str, &str> = raw
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would be a strange attack, but seems good to avoid collecting every pair in the signature since it could be malicious

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

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

Project coverage is 5.70%. Comparing base (d295678) to head (cff37d3).

Files Patch % Lines
async-stripe/src/client/headers.rs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            next    #528      +/-   ##
========================================
- Coverage   5.71%   5.70%   -0.02%     
========================================
  Files        932     932              
  Lines      38941   38933       -8     
========================================
- Hits        2227    2220       -7     
+ Misses     36714   36713       -1     

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

@arlyon arlyon merged commit 562c493 into arlyon:next Apr 6, 2024
20 checks passed
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