Skip to content

lib: derive Debug on StartHandshake - #120

Merged
cpu merged 1 commit into
rustls:mainfrom
lucab:lucab/pub-debug
Aug 13, 2025
Merged

cpu merged 1 commit into
rustls:mainfrom
lucab:lucab/pub-debug

Conversation

@lucab

@lucab lucab commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

This auto-derives a Debug implementation for StartHandshake.

@lucab

lucab commented Aug 6, 2025

Copy link
Copy Markdown
Contributor Author

I also wanted to enable the missing_debug_implementations lint for all public types, but I found that LazyConfigAcceptor needs some massaging first.
I opted for tweaking rustls with rustls/rustls#2592 for now, deferring the lint for later.

@lucab
lucab marked this pull request as ready for review August 6, 2025 14:36

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

I'm not that convinced. These aren't long-lived types nor are the debug values seemingly going to be especially meaningful.

@lucab

lucab commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor Author

@djc that's a fair point.
The (only, so far) type where I have encountered some friction is StartHandshake, which I'm storing as part of a state machine.
I can make the surface of this PR smaller (just that type?), or abandon it at all and implement my custom Debug in my consumer. Let me know what you prefer.

@djc

djc commented Aug 13, 2025

Copy link
Copy Markdown
Member

I can make the surface of this PR smaller (just that type?), or abandon it at all and implement my custom Debug in my consumer. Let me know what you prefer.

I'd be okay reviewing another iteration that only adds Debug for that type.

@lucab
lucab marked this pull request as draft August 13, 2025 10:41
This auto-derives a `Debug` implementation for `StartHandshake`.
@lucab lucab changed the title lib: derive Debug on public types lib: derive Debug on StartHandshake Aug 13, 2025
@lucab
lucab marked this pull request as ready for review August 13, 2025 14:17
@lucab

lucab commented Aug 13, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! I took the occasion to also add a docstring (and some breadcrumbs) on that type.

@djc
djc requested a review from cpu August 13, 2025 14:22

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

Thank you!

@cpu
cpu merged commit bf8b55d into rustls:main Aug 13, 2025
@lucab
lucab deleted the lucab/pub-debug branch August 13, 2025 15:06
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