Enable clippy::needless_question_mark (#8759)

This PR enables the
[`clippy::needless_question_mark`](https://rust-lang.github.io/rust-clippy/master/index.html#/needless_question_mark)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-02 23:40:39 -05:00 committed by GitHub
parent 33790b81fc
commit a6dbaac653
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 23 additions and 26 deletions

View file

@ -179,14 +179,13 @@ async fn add_contributor(
Json(params): Json<AuthenticatedUserParams>,
Extension(app): Extension<Arc<AppState>>,
) -> Result<()> {
Ok(app
.db
app.db
.add_contributor(
&params.github_login,
params.github_user_id,
params.github_email.as_deref(),
)
.await?)
.await
}
#[derive(Deserialize)]

View file

@ -1030,7 +1030,7 @@ impl Database {
if result.rows_affected != 1 {
Err(anyhow!("could not update room participant role"))?;
}
Ok(self.get_room(room_id, &tx).await?)
self.get_room(room_id, &tx).await
})
.await
}

View file

@ -43,7 +43,7 @@ async fn test_channels(db: &Arc<Database>) {
let mut members = db
.transaction(|tx| async move {
let channel = db.get_channel_internal(replace_id, &tx).await?;
Ok(db.get_channel_participants(&channel, &tx).await?)
db.get_channel_participants(&channel, &tx).await
})
.await
.unwrap();