Skip to content

Commit fc48def

Browse files
committed
minor: reword a bit
1 parent 967c088 commit fc48def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/dev/style.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ Between `ref` and mach ergonomics, the latter is more ergonomic in most cases, a
927927

928928
## Functional Combinators
929929

930-
Use high order monadic combinators like `map`, `then`, only when they are a natural choice, don't bend the code to fit into some combinator.
930+
Use high order monadic combinators like `map`, `then` when they are a natural choice; don't bend the code to fit into some combinator.
931931
If writing a chain of combinators creates friction, replace them with control flow constructs: `for`, `if`, `match`.
932932
Mostly avoid `bool::then` and `Option::filter`.
933933

@@ -944,7 +944,7 @@ Some(x).filter(|it| it.cond())
944944

945945
This rule is more "soft" then others, and boils down mostly to taste.
946946
The guiding principle behind this rule is that code should be dense in computation, and sparse in the number of expressions per line.
947-
The second example contains *less* computation -- `filter` function is an indirection for `if`, it doesn't do any useful work by itself.
947+
The second example contains *less* computation -- the `filter` function is an indirection for `if`, it doesn't do any useful work by itself.
948948
At the same time, it is more crowded -- it takes more time to visually scan it.
949949

950950
**Rationale:** consistency, playing to language's strengths.

0 commit comments

Comments
 (0)