@@ -23,7 +23,9 @@ use twilight_model::id::{
2323 marker:: { ChannelMarker , GenericMarker , GuildMarker , RoleMarker , UserMarker } ,
2424} ;
2525use util:: { db_to_id, id_to_db} ;
26- use xpd_common:: { AuditLogEvent , AuditLogEventKind , GuildConfig , RoleReward , UserInGuild , UserStatus } ;
26+ use xpd_common:: {
27+ AuditLogEvent , AuditLogEventKind , GuildConfig , RoleReward , UserInGuild , UserStatus ,
28+ } ;
2729pub async fn guild_rewards <
2830 ' a ,
2931 D : DerefMut < Target = PgConnection > + Send ,
@@ -253,12 +255,9 @@ pub async fn delete_audit_log_events_guild<
253255 guild : Id < GuildMarker > ,
254256) -> Result < ( ) , Error > {
255257 let mut conn = conn. acquire ( ) . await ?;
256- query ! (
257- "DELETE FROM audit_logs WHERE guild = $1" ,
258- id_to_db( guild)
259- )
260- . execute ( conn. as_mut ( ) )
261- . await ?;
258+ query ! ( "DELETE FROM audit_logs WHERE guild = $1" , id_to_db( guild) )
259+ . execute ( conn. as_mut ( ) )
260+ . await ?;
262261 Ok ( ( ) )
263262}
264263
@@ -271,12 +270,9 @@ pub async fn delete_audit_log_events_user<
271270 target : Id < UserMarker > ,
272271) -> Result < ( ) , Error > {
273272 let mut conn = conn. acquire ( ) . await ?;
274- query ! (
275- "DELETE FROM audit_logs WHERE target = $1" ,
276- id_to_db( target)
277- )
278- . execute ( conn. as_mut ( ) )
279- . await ?;
273+ query ! ( "DELETE FROM audit_logs WHERE target = $1" , id_to_db( target) )
274+ . execute ( conn. as_mut ( ) )
275+ . await ?;
280276 Ok ( ( ) )
281277}
282278
@@ -1098,7 +1094,7 @@ impl Display for Error {
10981094 Self :: Database ( de) => write ! ( f, "{de}" ) ,
10991095 Self :: Interpolation ( ie) => write ! ( f, "{ie}" ) ,
11001096 Self :: UnspecifiedDelete => f. write_str ( "No constraints specified to delete by." ) ,
1101- Self :: UnknownAuditLogEventKind => f. write_str ( "Unknown audit log event kind" )
1097+ Self :: UnknownAuditLogEventKind => f. write_str ( "Unknown audit log event kind" ) ,
11021098 }
11031099 }
11041100}
0 commit comments