Skip to content

race: Use Self ubiquitously.#280

Merged
matklad merged 1 commit intomatklad:masterfrom
briansmith:b/self
Mar 28, 2025
Merged

race: Use Self ubiquitously.#280
matklad merged 1 commit intomatklad:masterfrom
briansmith:b/self

Conversation

@briansmith
Copy link
Contributor

Avoid repeating type parameters and otherwise make it easier to see where a function is a constructor.

Avoid repeating type parameters and otherwise make it easier to see
where a function is a constructor.
@matklad
Copy link
Owner

matklad commented Mar 28, 2025

I personally prefer not to use self, as Self requires an extra mental dereference to figure out what the type actually is, but, at this point, using Self is clearly considered much more idiomatic in Rust, and you've been working on this code lately so its for you to call the shots!

@matklad matklad merged commit c294d64 into matklad:master Mar 28, 2025
1 check passed
@briansmith briansmith deleted the b/self branch March 28, 2025 15:17
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