Enable clippy::borrow_deref_ref (#8894)

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

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-05 12:24:54 -05:00 committed by GitHub
parent a25edcc5a8
commit b6af393e6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 67 additions and 68 deletions

View file

@ -11,7 +11,7 @@ impl Database {
) -> Result<Vec<proto::HostedProject>> {
Ok(hosted_project::Entity::find()
.filter(hosted_project::Column::ChannelId.is_in(channel_ids.iter().map(|id| id.0)))
.all(&*tx)
.all(tx)
.await?
.into_iter()
.flat_map(|project| {
@ -47,11 +47,11 @@ impl Database {
tx: &DatabaseTransaction,
) -> Result<(hosted_project::Model, ChannelRole)> {
let project = hosted_project::Entity::find_by_id(hosted_project_id)
.one(&*tx)
.one(tx)
.await?
.ok_or_else(|| anyhow!(ErrorCode::NoSuchProject))?;
let channel = channel::Entity::find_by_id(project.channel_id)
.one(&*tx)
.one(tx)
.await?
.ok_or_else(|| anyhow!(ErrorCode::NoSuchChannel))?;