github / twirp-rs

Twirp RPC for Rust
MIT License
24 stars 2 forks source link

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

Closed patrickt closed 8 months ago

patrickt commented 8 months ago

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

jorendorff commented 8 months ago

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.