Cargo clippy --fix

This commit is contained in:
Flori Weber 2023-06-11 13:54:08 +02:00
parent c745861592
commit da6cffa7a3
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
use chorus::{self, gateway::Gateway, types::GatewayIdentifyPayload}; use chorus::{self, gateway::Gateway, types::GatewayIdentifyPayload};
use tokio;
/// This example creates a simple gateway connection and a session with an Identify event /// This example creates a simple gateway connection and a session with an Identify event
#[tokio::main] #[tokio::main]

View File

@ -10,7 +10,7 @@ async fn get_channel() {
assert_eq!( assert_eq!(
bundle_channel, bundle_channel,
Channel::get(&mut bundle_user, &bundle_channel.id.to_string()) Channel::get(bundle_user, &bundle_channel.id.to_string())
.await .await
.unwrap() .unwrap()
); );

View File

@ -7,7 +7,7 @@ async fn add_remove_role() {
let role_id = &bundle.role.id.to_string(); let role_id = &bundle.role.id.to_string();
let user_id = &bundle.user.object.id.to_string(); let user_id = &bundle.user.object.id.to_string();
chorus::types::GuildMember::add_role(&mut bundle.user, guild_id, user_id, role_id).await; chorus::types::GuildMember::add_role(&mut bundle.user, guild_id, user_id, role_id).await;
let member = chorus::types::GuildMember::get(&mut bundle.user, &guild_id, &user_id) let member = chorus::types::GuildMember::get(&mut bundle.user, guild_id, user_id)
.await .await
.unwrap(); .unwrap();
let mut role_found = false; let mut role_found = false;
@ -21,7 +21,7 @@ async fn add_remove_role() {
assert!(false) assert!(false)
} }
chorus::types::GuildMember::remove_role(&mut bundle.user, guild_id, user_id, role_id).await; chorus::types::GuildMember::remove_role(&mut bundle.user, guild_id, user_id, role_id).await;
let member = chorus::types::GuildMember::get(&mut bundle.user, &guild_id, &user_id) let member = chorus::types::GuildMember::get(&mut bundle.user, guild_id, user_id)
.await .await
.unwrap(); .unwrap();
for role in member.roles.iter() { for role in member.roles.iter() {