Skip to content

Commit 23f0d4b

Browse files
bors[bot]azzamsa
andauthored
Merge #7723
7723: Fix typos r=lnicola a=azzamsa I have checked all the documents inside `docs/` using `grammarly.com`. There are many suggestions in each document (some of them are false positive). I choose to fix the typos only to avoid lengthy grammar discussions. I would like to suggest to the maintainers to take a look. It is worth it. IMHO, it better to put the article into `grammarly.com` or `languagetool.org` before pushing :). Co-authored-by: azzamsa <me@azzamsa.com>
2 parents 900ba71 + ae50b18 commit 23f0d4b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/dev/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ If you want to use IDE parts of rust-analyzer via LSP, custom flatbuffers-based
209209
The API uses editor's terminology, it talks about offsets and string labels rather than in terms of definitions or types.
210210
It is effectively the view in MVC and viewmodel in [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel).
211211
All arguments and return types are conceptually serializable.
212-
In particular, syntax tress and and hir types are generally absent from the API (but are used heavily in the implementation).
212+
In particular, syntax tress and hir types are generally absent from the API (but are used heavily in the implementation).
213213
Shout outs to LSP developers for popularizing the idea that "UI" is a good place to draw a boundary at.
214214

215215
`ide` is also the first crate which has the notion of change over time.
@@ -230,7 +230,7 @@ This crate defines the `rust-analyzer` binary, so it is the **entry point**.
230230
It implements the language server.
231231

232232
**Architecture Invariant:** `rust-analyzer` is the only crate that knows about LSP and JSON serialization.
233-
If you want to expose a datastructure `X` from ide to LSP, don't make it serializable.
233+
If you want to expose a data structure `X` from ide to LSP, don't make it serializable.
234234
Instead, create a serializable counterpart in `rust-analyzer` crate and manually convert between the two.
235235

236236
`GlobalState` is the state of the server.
@@ -418,7 +418,7 @@ We use `always` and `never` macros instead of `assert` to gracefully recover fro
418418

419419
### Observability
420420

421-
rust-analyzer is a long-running process, so its important to understand what's going on inside.
421+
rust-analyzer is a long-running process, so it is important to understand what's going on inside.
422422
We have several instruments for that.
423423

424424
The event loop that runs rust-analyzer is very explicit.

docs/dev/style.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For the second group, the change would be subjected to quite a bit of scrutiny a
4141
The new API needs to be right (or at least easy to change later).
4242
The actual implementation doesn't matter that much.
4343
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.
4545
In this case, we'll probably ask you to split API changes into a separate PR.
4646

4747
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
102102
## Minimal Tests
103103

104104
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.
106106

107107
It also makes sense to format snippets more compactly (for example, by placing enum definitions like `enum E { Foo, Bar }` on a single line),
108108
as long as they are still readable.
@@ -227,7 +227,7 @@ if idx >= len {
227227
}
228228
```
229229

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.
231231

232232
## Assertions
233233

0 commit comments

Comments
 (0)