apply clippy suggestions
This commit is contained in:
parent
f7ea86917f
commit
603c8c8150
|
@ -48,7 +48,7 @@ impl Channel {
|
|||
.delete(format!(
|
||||
"{}/channels/{}/",
|
||||
user.belongs_to.borrow_mut().urls.get_api(),
|
||||
self.id.to_string()
|
||||
self.id
|
||||
))
|
||||
.bearer_auth(user.token());
|
||||
let response =
|
||||
|
|
|
@ -48,7 +48,7 @@ pub async fn deserialize_response<T: for<'a> Deserialize<'a>>(
|
|||
return Err(ChorusLibError::InvalidResponseError {
|
||||
error: format!(
|
||||
"Error while trying to process the HTTP response into a String: {}",
|
||||
e.to_string()
|
||||
e
|
||||
),
|
||||
});
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ pub async fn deserialize_response<T: for<'a> Deserialize<'a>>(
|
|||
return Err(ChorusLibError::InvalidResponseError {
|
||||
error: format!(
|
||||
"Error while trying to deserialize the JSON response into T: {}",
|
||||
e.to_string()
|
||||
e
|
||||
),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ impl Guild {
|
|||
.get(format!(
|
||||
"{}/guilds/{}/channels/",
|
||||
user.belongs_to.borrow().urls.get_api(),
|
||||
self.id.to_string()
|
||||
self.id
|
||||
))
|
||||
.bearer_auth(user.token());
|
||||
let result = handle_request(request, user, crate::api::limits::LimitType::Channel)
|
||||
|
|
|
@ -417,11 +417,9 @@ impl Gateway {
|
|||
if msg.is_error() {
|
||||
println!("GW: Received error, connection will close..");
|
||||
|
||||
let error = msg.error();
|
||||
let _error = msg.error();
|
||||
|
||||
match error {
|
||||
_ => {}
|
||||
}
|
||||
{}
|
||||
|
||||
self.close().await;
|
||||
return;
|
||||
|
|
|
@ -93,6 +93,7 @@ pub async fn setup() -> TestBundle {
|
|||
}
|
||||
|
||||
// Teardown method to clean up after a test.
|
||||
#[allow(dead_code)]
|
||||
pub async fn teardown(mut bundle: TestBundle) {
|
||||
Guild::delete(&mut bundle.user, &bundle.guild.id.to_string()).await;
|
||||
bundle.user.delete().await;
|
||||
|
|
Loading…
Reference in New Issue