Enable clippy::explicit_auto_deref (#8753)

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

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-02 22:30:18 -05:00 committed by GitHub
parent 6a9e8faad2
commit 659974411d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 126 additions and 128 deletions

View file

@ -42,8 +42,8 @@ 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?)
let channel = db.get_channel_internal(replace_id, &tx).await?;
Ok(db.get_channel_participants(&channel, &tx).await?)
})
.await
.unwrap();
@ -464,9 +464,9 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
db.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(public_channel_id, &*tx).await?,
&db.get_channel_internal(public_channel_id, &tx).await?,
admin,
&*tx,
&tx,
)
.await
})
@ -474,9 +474,9 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
.unwrap();
db.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(public_channel_id, &*tx).await?,
&db.get_channel_internal(public_channel_id, &tx).await?,
member,
&*tx,
&tx,
)
.await
})
@ -517,9 +517,9 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
db.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(public_channel_id, &*tx).await?,
&db.get_channel_internal(public_channel_id, &tx).await?,
guest,
&*tx,
&tx,
)
.await
})
@ -547,11 +547,11 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
assert!(db
.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(public_channel_id, &*tx)
&db.get_channel_internal(public_channel_id, &tx)
.await
.unwrap(),
guest,
&*tx,
&tx,
)
.await
})
@ -629,9 +629,9 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
db.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(zed_channel, &*tx).await.unwrap(),
&db.get_channel_internal(zed_channel, &tx).await.unwrap(),
guest,
&*tx,
&tx,
)
.await
})
@ -640,11 +640,11 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
assert!(db
.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(internal_channel_id, &*tx)
&db.get_channel_internal(internal_channel_id, &tx)
.await
.unwrap(),
guest,
&*tx,
&tx,
)
.await
})
@ -653,11 +653,11 @@ async fn test_user_is_channel_participant(db: &Arc<Database>) {
db.transaction(|tx| async move {
db.check_user_is_channel_participant(
&db.get_channel_internal(public_channel_id, &*tx)
&db.get_channel_internal(public_channel_id, &tx)
.await
.unwrap(),
guest,
&*tx,
&tx,
)
.await
})