refactor: solve clippy hints

This commit is contained in:
Paul Makles
2023-08-27 11:23:02 +01:00
parent 5372296dc0
commit c2412190a8
5 changed files with 15 additions and 5 deletions

View File

@@ -41,6 +41,7 @@ impl AbstractChannelUnreads for ReferenceDb {
async fn acknowledge_channels(&self, user_id: &str, channel_ids: &[String]) -> Result<()> {
let current_time = Ulid::new().to_string();
for channel_id in channel_ids {
#[allow(clippy::disallowed_methods)]
self.acknowledge_message(channel_id, user_id, &current_time)
.await?;
}

View File

@@ -164,6 +164,7 @@ auto_derived!(
}
);
#[allow(clippy::disallowed_methods)]
impl Channel {
/// Create a channel
pub async fn create(&self, db: &Database) -> Result<()> {

View File

@@ -128,6 +128,7 @@ auto_derived!(
}
);
#[allow(clippy::disallowed_methods)]
impl Server {
/// Create a server
pub async fn create(&self, db: &Database) -> Result<()> {

View File

@@ -394,9 +394,7 @@ impl From<crate::Interactions> for Interactions {
impl From<crate::AppendMessage> for AppendMessage {
fn from(value: crate::AppendMessage) -> Self {
AppendMessage {
embeds: value
.embeds
.map(|embeds| embeds.into_iter().map(|embed| embed.into()).collect()),
embeds: value.embeds,
}
}
}