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