Skip to content

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Aug 6, 2025

This auto-derives a Debug implementation for StartHandshake.

@lucab
Copy link
Contributor Author

lucab commented Aug 6, 2025

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
Copy link
Member

@djc djc left a comment

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
Copy link
Contributor Author

lucab commented Aug 6, 2025

@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
Copy link
Member

djc commented Aug 13, 2025

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
Copy link
Contributor Author

lucab commented Aug 13, 2025

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
Copy link
Member

@cpu cpu left a comment

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
6 checks passed
@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