Update CODE_STYLE.md

This commit is contained in:
Temirkhan Myrzamadi 2020-01-08 16:20:20 +06:00 committed by GitHub
parent 7444d016f1
commit 2a1b459bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,3 +24,20 @@ Good:
P: Into<InputFile>, P: Into<InputFile>,
E: Into<String> { ... } E: Into<String> { ... }
``` ```
## Comments
Comments must describe what your code does and mustn't describe how your code does it and bla-bla-bla. Be sure that your comments follow the grammar, including punctiation, the first capital letter and so on.
Bad:
```rust
/// this function make request to telegram
pub fn make_request(url: &str) -> String { ... }
```
Good:
```rust
/// This function makes a request to Telegram.
pub fn make_request(url: &str) -> String { ... }
```