mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 06:03:58 +00:00
Fix typo in style guide
This commit is contained in:
parent
a6a5b02f4c
commit
f0cffb66b3
1 changed files with 4 additions and 3 deletions
|
@ -294,8 +294,9 @@ Prefer `Default` even it has to be implemented manually.
|
||||||
|
|
||||||
**Rationale:** less typing in the common case, uniformity.
|
**Rationale:** less typing in the common case, uniformity.
|
||||||
|
|
||||||
Use `Vec::new` rather than `vec![]`. **Rationale:** uniformity, strength
|
Use `Vec::new` rather than `vec![]`.
|
||||||
reduction.
|
|
||||||
|
**Rationale:** uniformity, strength reduction.
|
||||||
|
|
||||||
## Functions Over Objects
|
## Functions Over Objects
|
||||||
|
|
||||||
|
@ -479,7 +480,7 @@ pub fn reachable_nodes(node: Node) -> FxHashSet<Node> {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Rational:** re-use allocations, accumulator style is more concise for complex cases.
|
**Rationale:** re-use allocations, accumulator style is more concise for complex cases.
|
||||||
|
|
||||||
# Style
|
# Style
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue