mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-23 23:29:37 +01:00
Update CODE_STYLE.md
This commit is contained in:
parent
7444d016f1
commit
2a1b459bc2
1 changed files with 17 additions and 0 deletions
|
@ -24,3 +24,20 @@ Good:
|
|||
P: Into<InputFile>,
|
||||
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 { ... }
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue