Skip to content

Commit 6ab66d4

Browse files
authored
minor: fix a typo in the style guide
1 parent 2cb85c1 commit 6ab66d4

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,13 +927,13 @@ When doing multiple comparisons use `<`/`<=`, avoid `>`/`>=`.
927927
assert!(lo <= x && x <= hi);
928928
assert!(r1 < l2 || r2 < l1);
929929
assert!(x < y);
930-
assert!(x > 0);
930+
assert!(0 < x);
931931

932932
// BAD
933933
assert!(x >= lo && x <= hi);
934934
assert!(r1 < l2 || l1 > r2);
935935
assert!(y > x);
936-
assert!(0 > x);
936+
assert!(x > 0);
937937
```
938938

939939
**Rationale:** Less-then comparisons are more intuitive, they correspond spatially to [real line](https://en.wikipedia.org/wiki/Real_line).

0 commit comments

Comments
 (0)