Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

Commit a528403

Browse files
stop using doc comments in line comment example
The old example used doc comments, but stated "line comments". This uses line comments instead, and provides a counterexample of block comments for clarity. Closes #11.
1 parent 83cb8fc commit a528403

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

style/comments.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22

33
### Avoid block comments.
44

5-
Use line comments instead:
5+
Use line comments:
66

77
``` rust
8-
/// Creates and executes a new child task
9-
///
10-
/// Sets up a new task with its own call stack and schedules it to run
11-
/// the provided unique closure.
12-
///
13-
/// This function is equivalent to `TaskBuilder::new().spawn(f)`.
14-
pub fn spawn(f: proc():Send) { ... }
8+
// Wait for the main task to return, and set the process error code
9+
// appropriately.
10+
```
11+
12+
Instead of:
13+
14+
``` rust
15+
/*
16+
* Wait for the main task to return, and set the process error code
17+
* appropriately.
18+
*/
1519
```
1620

1721
## Doc comments

0 commit comments

Comments
 (0)