Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't special-case the spelling of Api. #13

Merged
merged 3 commits into from
Feb 5, 2024
Merged

Don't special-case the spelling of Api. #13

merged 3 commits into from
Feb 5, 2024

Conversation

patrickt
Copy link
Contributor

@patrickt patrickt commented Feb 2, 2024

According to @jorendorff, Rust best practices are to avoid capitalizing acronyms.

According to @jorendorff, Rust best practices are to avoid capitalizing acronyms.
@patrickt patrickt requested a review from a team as a code owner February 2, 2024 18:00
@jorendorff
Copy link
Contributor

This is documented here:

In UpperCamelCase, acronyms and contractions of compound words count as one word: use Uuid rather than UUID, Usize rather than USize or Stdin rather than StdIn. In snake_case, acronyms and contractions are lower-cased: is_xid_start.

Examples in the standard library include OsString, TcpListener, IpAddress, Cow, AsciiExt, Utf8Error. The ecosystem really does follow this rule: the uuid crate really does use Uuid; hyper has Http instead of HTTP; git2 has Oid and Odb; and so on.

@jorendorff jorendorff merged commit ee6d782 into main Feb 5, 2024
@jorendorff jorendorff deleted the no-caps-please branch February 5, 2024 15:45
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.

None yet

3 participants