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:
parent
a25edcc5a8
commit
b6af393e6d
13 changed files with 67 additions and 68 deletions
|
@ -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))?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue