From 2a1b459bc22d8673553e52ae37a1c90d6a7a8412 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 8 Jan 2020 16:20:20 +0600 Subject: [PATCH] Update CODE_STYLE.md --- CODE_STYLE.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CODE_STYLE.md b/CODE_STYLE.md index 61f860e4..d0603921 100644 --- a/CODE_STYLE.md +++ b/CODE_STYLE.md @@ -24,3 +24,20 @@ Good: P: Into, E: Into { ... } ``` + +## 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 { ... } +```