mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Updated Note style guide (markdown)
@@ -10,9 +10,11 @@ Here are some rough guidelines to Rust style. They are followed unevenly and the
|
||||
## General
|
||||
|
||||
* Type names and enumeration variants should be in `CamelCase`.
|
||||
* Acrynoms too should be camel case: `Uuid`, not `UUID`.
|
||||
* Functions, methods, and variables should be `lowercase_with_underscores` where it helps readability.
|
||||
* Static variables should be in `ALL_CAPS`.
|
||||
* Constructors are methods called `new` or `new_with_more_details`.
|
||||
* Constructors that simply convert from another type are methods called `from_foo`.
|
||||
* When writing a binding to an external library, put the raw C bindings in a module called `ffi` (rather than `ll`). Do not create high-level bindings called `hl`.
|
||||
|
||||
## Trait naming
|
||||
|
||||
Reference in New Issue
Block a user