Run clippy

This commit is contained in:
bitfl0wer 2023-05-07 12:41:14 +02:00
parent 6a94d34bb5
commit 31407c1bf1
3 changed files with 9 additions and 9 deletions

View File

@ -45,10 +45,10 @@ pub mod messages {
)
.await
} else {
return Err(crate::errors::InstanceServerError::InvalidFormBodyError {
Err(crate::errors::InstanceServerError::InvalidFormBodyError {
error_type: "Not implemented".to_string(),
error: "Not implemented".to_string(),
});
})
}
}
}
@ -56,7 +56,7 @@ pub mod messages {
impl<'a> User<'a> {
pub async fn send_message(
&mut self,
mut message: &mut crate::api::schemas::MessageSendSchema,
message: &mut crate::api::schemas::MessageSendSchema,
channel_id: &String,
files: Option<Vec<PartialDiscordFileAttachment>>,
) -> Result<reqwest::Response, crate::errors::InstanceServerError> {
@ -64,7 +64,7 @@ pub mod messages {
Message::send(
&self.belongs_to.urls.get_api().to_string(),
channel_id,
&mut message,
message,
files,
&token,
self,
@ -77,12 +77,12 @@ pub mod messages {
#[cfg(test)]
mod test {
use crate::{
api::{AuthUsername, LoginSchema, MessageSendSchema, UserObject},
api::{AuthUsername, LoginSchema},
instance::Instance,
limit::LimitedRequester,
};
use super::*;
#[tokio::test]
async fn send_message() {

View File

@ -75,7 +75,7 @@ impl Instance {
#[cfg(test)]
mod test {
use super::*;
#[tokio::test]
async fn get_user() {}

View File

@ -36,11 +36,11 @@ impl<'a> Gateway<'a> {
websocket_url: String,
token: String,
) -> Result<Gateway<'a>, tokio_tungstenite::tungstenite::Error> {
return Ok(Gateway {
Ok(Gateway {
url: websocket_url,
token,
events: Events::default(),
});
})
}
}