mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 17:52:12 +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>,
|
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 { ... }
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue