about summary refs log tree commit diff
path: root/docs/dev
diff options
context:
space:
mode:
authorWaffle Maybe <waffle.lapkin@gmail.com>2022-01-26 17:07:17 +0300
committerGitHub <noreply@github.com>2022-01-26 17:07:17 +0300
commit6ab66d4c9ab52655e2f3cd9a7b1182ce90dbe4b8 (patch)
tree35c4b1c92a59f6e19e53f373ef24f5f943d3b05a /docs/dev
parent2cb85c14b622002767c66881c6a316a94e0f0be4 (diff)
downloadrust-6ab66d4c9ab52655e2f3cd9a7b1182ce90dbe4b8.tar.gz
rust-6ab66d4c9ab52655e2f3cd9a7b1182ce90dbe4b8.zip
minor: fix a typo in the style guide
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/style.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md
index e11005c5604..d64c050ccd5 100644
--- a/docs/dev/style.md
+++ b/docs/dev/style.md
@@ -927,13 +927,13 @@ When doing multiple comparisons use `<`/`<=`, avoid `>`/`>=`.
 assert!(lo <= x && x <= hi);
 assert!(r1 < l2 || r2 < l1);
 assert!(x < y);
-assert!(x > 0);
+assert!(0 < x);
 
 // BAD
 assert!(x >= lo && x <= hi);
 assert!(r1 < l2 || l1 > r2);
 assert!(y > x);
-assert!(0 > x);
+assert!(x > 0);
 ```
 
 **Rationale:** Less-then comparisons are more intuitive, they correspond spatially to [real line](https://en.wikipedia.org/wiki/Real_line).