Update tenses of doc comment summary lines (#4161)

This PR updates the tenses used by the summary line of doc comments to
match the [Rust API documentation
conventions](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#summary-sentence).

Specifically:

> The summary line should be written in third person singular present
indicative form. Basically, this means write ‘Returns’ instead of
‘Return’.

I'm sure there are plenty occurrences that I missed.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-19 11:18:50 -05:00 committed by GitHub
parent cb1b7915ee
commit 01f06f96a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 75 additions and 73 deletions

View file

@ -195,9 +195,10 @@ impl Object {
}
}
/// Return a range that surrounds the word relative_to is in
/// If relative_to is at the start of a word, return the word.
/// If relative_to is between words, return the space between
/// Returns a range that surrounds the word `relative_to` is in.
///
/// If `relative_to` is at the start of a word, return the word.
/// If `relative_to` is between words, return the space between.
fn in_word(
map: &DisplaySnapshot,
relative_to: DisplayPoint,
@ -225,11 +226,12 @@ fn in_word(
Some(start..end)
}
/// Return a range that surrounds the word and following whitespace
/// Returns a range that surrounds the word and following whitespace
/// relative_to is in.
/// If relative_to is at the start of a word, return the word and following whitespace.
/// If relative_to is between words, return the whitespace back and the following word
///
/// If `relative_to` is at the start of a word, return the word and following whitespace.
/// If `relative_to` is between words, return the whitespace back and the following word.
///
/// if in word
/// delete that word
/// if there is whitespace following the word, delete that as well