hello-algo
hello-algo copied to clipboard
Refine some details and coding style for Rust codes
If this PR is related to coding or code translation, please read the contribution guideline, fill out the checklist, and paste the console outputs to the PR.
- [x] I've tested the code and ensured the outputs are the same as the outputs of reference codes.
- [x] I've checked the codes (formatting, comments, indentation, file header, etc) carefully.
- [x] The code does not rely on a particular environment or IDE and can be executed on a standard system (Win, macOS, Ubuntu).
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
hello-algo | ⬜️ Ignored (Inspect) | Feb 7, 2023 at 2:10PM (UTC) |
Thank @sjinzh for the great improvement!
I recommend keeping the comment format of
/* ... */
for the class and function headers.This book follow this rule of comment formatting.
/* 标题注释,用于标注函数、类、测试样例等 */ // 内容注释,用于详解代码 /** * 多行 * 注释 */
More details at 关于本书
@krahets OK. It had better follow the rule for rust codes as shown below.
/* 标题注释,用于标注函数、类、测试样例等 */ // 内容注释,用于详解代码 /* * 多行 * 注释 */
Two more comments, please.
@krahets The below comment style in the rust file header would result in rustdoc warning with the following include!() macro.
/** * 多行 * 注释 */
So, It had better follow the comment style in the rust file header as shown below, and this is OK.
/* * 多行 * 注释 */