Skip to content

turn CertificatePayload type alias into a newtype - #1610

Merged
cpu merged 1 commit into
rustls:mainfrom
japaric:certificate-chain-newtype
Nov 22, 2023
Merged

cpu merged 1 commit into
rustls:mainfrom
japaric:certificate-chain-newtype

Conversation

@japaric

@japaric japaric commented Nov 21, 2023

Copy link
Copy Markdown
Contributor

being careful not to use it in user-facing / non-internal API like {Client,Server}Config

extracted out of #1597 as it can land ahead of time. I found this useful in that PR as CertificateChain becomes non-owning, gains a lifetime parameter and there's a need to go from the borrowed version to the owned version which fits nicely in a method on the newtype

@codecov

codecov Bot commented Nov 21, 2023 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c1e34d1) 95.73% compared to head (326958f) 95.74%.
Report is 3 commits behind head on main.

❗ Current head 326958f differs from pull request most recent head 5b70748. Consider uploading reports for the commit 5b70748 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1610   +/-   ##
=======================================
  Coverage   95.73%   95.74%           
=======================================
  Files          79       79           
  Lines       16188    16216   +28     
=======================================
+ Hits        15498    15526   +28     
  Misses        690      690           

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

@djc djc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems reasonable to me.

Comment thread rustls/src/msgs/handshake.rs Resolved
Comment thread rustls/src/client/tls12.rs Resolved
Comment thread rustls/src/client/handy.rs Resolved
@japaric
japaric force-pushed the certificate-chain-newtype branch from 326958f to 5b70748 Compare November 22, 2023 09:55
@japaric

japaric commented Nov 22, 2023

Copy link
Copy Markdown
Contributor Author

addressed review comments

@japaric japaric closed this Nov 22, 2023
@japaric japaric reopened this Nov 22, 2023

@cpu cpu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@cpu
cpu added this pull request to the merge queue Nov 22, 2023
Merged via the queue into rustls:main with commit 65ade3c Nov 22, 2023
@japaric
japaric deleted the certificate-chain-newtype branch November 22, 2023 14:39
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.

3 participants