diff options
Diffstat (limited to 'docs/dev/style.md')
-rw-r--r-- | docs/dev/style.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md index 73ce59b87..dd71e3932 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md | |||
@@ -41,7 +41,7 @@ For the second group, the change would be subjected to quite a bit of scrutiny a | |||
41 | The new API needs to be right (or at least easy to change later). | 41 | The new API needs to be right (or at least easy to change later). |
42 | The actual implementation doesn't matter that much. | 42 | The actual implementation doesn't matter that much. |
43 | It's very important to minimize the amount of changed lines of code for changes of the second kind. | 43 | It's very important to minimize the amount of changed lines of code for changes of the second kind. |
44 | Often, you start doing a change of the first kind, only to realise that you need to elevate to a change of the second kind. | 44 | Often, you start doing a change of the first kind, only to realize that you need to elevate to a change of the second kind. |
45 | In this case, we'll probably ask you to split API changes into a separate PR. | 45 | In this case, we'll probably ask you to split API changes into a separate PR. |
46 | 46 | ||
47 | Changes of the third group should be pretty rare, so we don't specify any specific process for them. | 47 | Changes of the third group should be pretty rare, so we don't specify any specific process for them. |
@@ -102,7 +102,7 @@ Of course, applying Clippy suggestions is welcome as long as they indeed improve | |||
102 | ## Minimal Tests | 102 | ## Minimal Tests |
103 | 103 | ||
104 | Most tests in rust-analyzer start with a snippet of Rust code. | 104 | Most tests in rust-analyzer start with a snippet of Rust code. |
105 | This snippets should be minimal -- if you copy-paste a snippet of real code into the tests, make sure to remove everything which could be removed. | 105 | These snippets should be minimal -- if you copy-paste a snippet of real code into the tests, make sure to remove everything which could be removed. |
106 | 106 | ||
107 | It also makes sense to format snippets more compactly (for example, by placing enum definitions like `enum E { Foo, Bar }` on a single line), | 107 | It also makes sense to format snippets more compactly (for example, by placing enum definitions like `enum E { Foo, Bar }` on a single line), |
108 | as long as they are still readable. | 108 | as long as they are still readable. |
@@ -227,7 +227,7 @@ if idx >= len { | |||
227 | } | 227 | } |
228 | ``` | 228 | ``` |
229 | 229 | ||
230 | **Rationale:** its useful to see the invariant relied upon by the rest of the function clearly spelled out. | 230 | **Rationale:** it's useful to see the invariant relied upon by the rest of the function clearly spelled out. |
231 | 231 | ||
232 | ## Assertions | 232 | ## Assertions |
233 | 233 | ||