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:
parent
cb1b7915ee
commit
01f06f96a1
19 changed files with 75 additions and 73 deletions
|
@ -864,7 +864,7 @@ impl AppContext {
|
|||
.unwrap()
|
||||
}
|
||||
|
||||
/// Set the value of the global of the given type.
|
||||
/// Sets the value of the global of the given type.
|
||||
pub fn set_global<G: Any>(&mut self, global: G) {
|
||||
let global_type = TypeId::of::<G>();
|
||||
self.push_effect(Effect::NotifyGlobalObservers { global_type });
|
||||
|
@ -889,7 +889,7 @@ impl AppContext {
|
|||
.unwrap()
|
||||
}
|
||||
|
||||
/// Update the global of the given type with a closure. Unlike `global_mut`, this method provides
|
||||
/// Updates the global of the given type with a closure. Unlike `global_mut`, this method provides
|
||||
/// your closure with mutable access to the `AppContext` and the global simultaneously.
|
||||
pub fn update_global<G: 'static, R>(&mut self, f: impl FnOnce(&mut G, &mut Self) -> R) -> R {
|
||||
self.update(|cx| {
|
||||
|
@ -1106,7 +1106,7 @@ impl AppContext {
|
|||
.contains_key(&action.as_any().type_id())
|
||||
}
|
||||
|
||||
/// Set the menu bar for this application. This will replace any existing menu bar.
|
||||
/// Sets the menu bar for this application. This will replace any existing menu bar.
|
||||
pub fn set_menus(&mut self, menus: Vec<Menu>) {
|
||||
self.platform.set_menus(menus, &self.keymap.lock());
|
||||
}
|
||||
|
@ -1190,7 +1190,7 @@ impl Context for AppContext {
|
|||
})
|
||||
}
|
||||
|
||||
/// Update the entity referenced by the given model. The function is passed a mutable reference to the
|
||||
/// Updates the entity referenced by the given model. The function is passed a mutable reference to the
|
||||
/// entity along with a `ModelContext` for the entity.
|
||||
fn update_model<T: 'static, R>(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue