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
|
@ -66,7 +66,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Create a notification. If `avoid_duplicates` is set to true, then avoid
|
||||
/// Creates a notification. If `avoid_duplicates` is set to true, then avoid
|
||||
/// creating a new notification if the given recipient already has an
|
||||
/// unread notification with the given kind and entity id.
|
||||
pub async fn create_notification(
|
||||
|
|
|
@ -153,7 +153,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Set "connected_once" on the user for analytics.
|
||||
/// Sets "connected_once" on the user for analytics.
|
||||
pub async fn set_user_connected_once(&self, id: UserId, connected_once: bool) -> Result<()> {
|
||||
self.transaction(|tx| async move {
|
||||
user::Entity::update_many()
|
||||
|
@ -252,7 +252,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Return the active flags for the user.
|
||||
/// Returns the active flags for the user.
|
||||
pub async fn get_user_flags(&self, user: UserId) -> Result<Vec<String>> {
|
||||
self.transaction(|tx| async move {
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||
|
|
|
@ -950,7 +950,7 @@ async fn ping(_: proto::Ping, response: Response<proto::Ping>, _session: Session
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Create a new room for calling (outside of channels)
|
||||
/// Creates a new room for calling (outside of channels)
|
||||
async fn create_room(
|
||||
_request: proto::CreateRoom,
|
||||
response: Response<proto::CreateRoom>,
|
||||
|
@ -1276,7 +1276,7 @@ async fn leave_room(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Update the permissions of someone else in the room.
|
||||
/// Updates the permissions of someone else in the room.
|
||||
async fn set_room_participant_role(
|
||||
request: proto::SetRoomParticipantRole,
|
||||
response: Response<proto::SetRoomParticipantRole>,
|
||||
|
@ -1460,7 +1460,7 @@ async fn decline_call(message: proto::DeclineCall, session: Session) -> Result<(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Update other participants in the room with your current location.
|
||||
/// Updates other participants in the room with your current location.
|
||||
async fn update_participant_location(
|
||||
request: proto::UpdateParticipantLocation,
|
||||
response: Response<proto::UpdateParticipantLocation>,
|
||||
|
@ -1673,7 +1673,7 @@ async fn leave_project(request: proto::LeaveProject, session: Session) -> Result
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Update other participants with changes to the project
|
||||
/// Updates other participants with changes to the project
|
||||
async fn update_project(
|
||||
request: proto::UpdateProject,
|
||||
response: Response<proto::UpdateProject>,
|
||||
|
@ -1700,7 +1700,7 @@ async fn update_project(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Update other participants with changes to the worktree
|
||||
/// Updates other participants with changes to the worktree
|
||||
async fn update_worktree(
|
||||
request: proto::UpdateWorktree,
|
||||
response: Response<proto::UpdateWorktree>,
|
||||
|
@ -1725,7 +1725,7 @@ async fn update_worktree(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Update other participants with changes to the diagnostics
|
||||
/// Updates other participants with changes to the diagnostics
|
||||
async fn update_diagnostic_summary(
|
||||
message: proto::UpdateDiagnosticSummary,
|
||||
session: Session,
|
||||
|
@ -1749,7 +1749,7 @@ async fn update_diagnostic_summary(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Update other participants with changes to the worktree settings
|
||||
/// Updates other participants with changes to the worktree settings
|
||||
async fn update_worktree_settings(
|
||||
message: proto::UpdateWorktreeSettings,
|
||||
session: Session,
|
||||
|
@ -2293,7 +2293,7 @@ async fn remove_contact(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Create a new channel.
|
||||
/// Creates a new channel.
|
||||
async fn create_channel(
|
||||
request: proto::CreateChannel,
|
||||
response: Response<proto::CreateChannel>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue