Skip to content

Minor tweaks to Debug impls and other style improvements#348

Merged
djc merged 6 commits into
mainfrom
tweak-debug
May 20, 2025
Merged

Minor tweaks to Debug impls and other style improvements#348
djc merged 6 commits into
mainfrom
tweak-debug

Conversation

@djc

@djc djc commented May 20, 2025

Copy link
Copy Markdown
Member

Follow up on #343.

@djc djc requested review from cpu and est31 May 20, 2025 10:19

@est31 est31 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 don't like the strong use of Self here: let's not change that: if you don't use an IDE, you can quickly find where some type is constructed or used, but if it's mentioned via Self, that's not possible. The other changes are fine.

@djc

djc commented May 20, 2025

Copy link
Copy Markdown
Member Author

I don't like the strong use of Self here: let's not change that: if you don't use an IDE, you can quickly find where some type is constructed or used, but if it's mentioned via Self, that's not possible. The other changes are fine.

I disagree: Self is only used in the context of an impl, so it's relatively straightforward (and often pretty close to what you're looking at) to just look at one level up in the hierarchy.

Dropped the commit for now.

@cpu

cpu commented May 20, 2025

Copy link
Copy Markdown
Member

if you don't use an IDE

This doesn't seem like a category of contributor/user worth optimizing for IMO.

@djc djc merged commit e073ceb into main May 20, 2025
12 of 15 checks passed
@djc djc deleted the tweak-debug branch May 20, 2025 15:03
@est31

est31 commented May 20, 2025

Copy link
Copy Markdown
Member

This doesn't seem like a category of contributor/user worth optimizing for IMO.

even if you do use an IDE, not every time you interact you have an IDE around, say when reviewing PRs on github for example, or when searching on github search. And IDE features are not omnipresent/omniscient. e.g. macros come in mind, or stuff like #[cfg(test)] code.

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