From 912d2185d9f0e29a6c54d3c9333d3037ca55bcc6 Mon Sep 17 00:00:00 2001 From: NexVeridian Date: Fri, 18 Oct 2024 13:05:55 -0700 Subject: [PATCH] cargo fmt and cargo fix cargo fix --- examples/demo/src/app.rs | 4 ++-- examples/demo/src/controllers/cache.rs | 3 ++- examples/demo/src/controllers/responses.rs | 3 +-- examples/demo/src/models/roles.rs | 1 - src/mailer/email_sender.rs | 3 ++- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/demo/src/app.rs b/examples/demo/src/app.rs index 7fae62e22..bfc31e1f6 100644 --- a/examples/demo/src/app.rs +++ b/examples/demo/src/app.rs @@ -48,8 +48,8 @@ impl Hooks for App { } // - async fn initializers(ctx: &AppContext) -> Result>> { - let mut initializers: Vec> = vec![ + async fn initializers(_ctx: &AppContext) -> Result>> { + let initializers: Vec> = vec![ Box::new(initializers::axum_session::AxumSessionInitializer), Box::new(initializers::view_engine::ViewEngineInitializer), Box::new(initializers::hello_view_engine::HelloViewEngineInitializer), diff --git a/examples/demo/src/controllers/cache.rs b/examples/demo/src/controllers/cache.rs index 5edee1b8b..90c95fe4c 100644 --- a/examples/demo/src/controllers/cache.rs +++ b/examples/demo/src/controllers/cache.rs @@ -1,6 +1,7 @@ -use crate::models::users; use loco_rs::prelude::*; use serde::{Deserialize, Serialize}; + +use crate::models::users; #[derive(Serialize, Deserialize)] pub struct CacheResponse { value: Option, diff --git a/examples/demo/src/controllers/responses.rs b/examples/demo/src/controllers/responses.rs index cbdaa2ce8..410bea4a0 100644 --- a/examples/demo/src/controllers/responses.rs +++ b/examples/demo/src/controllers/responses.rs @@ -148,6 +148,5 @@ pub fn routes() -> Routes { } pub fn api_routes() -> OpenApiRouter { - OpenApiRouter::new() - .routes(routes!(album)) + OpenApiRouter::new().routes(routes!(album)) } diff --git a/examples/demo/src/models/roles.rs b/examples/demo/src/models/roles.rs index b591340cb..8c45bf9aa 100644 --- a/examples/demo/src/models/roles.rs +++ b/examples/demo/src/models/roles.rs @@ -1,5 +1,4 @@ use loco_rs::prelude::*; -use sea_orm::entity::prelude::*; pub use super::_entities::roles::{self, ActiveModel, Entity, Model}; use crate::models::{_entities::sea_orm_active_enums::RolesName, users, users_roles}; diff --git a/src/mailer/email_sender.rs b/src/mailer/email_sender.rs index 61fe0474b..e392365b5 100644 --- a/src/mailer/email_sender.rs +++ b/src/mailer/email_sender.rs @@ -93,7 +93,8 @@ impl EmailSender { /// /// # Errors /// - /// When email doesn't send successfully or has an error to build the message + /// When email doesn't send successfully or has an error to build the + /// message pub async fn mail(&self, email: &Email) -> Result<()> { let content = MultiPart::alternative_plain_html(email.text.clone(), email.html.clone()); let mut builder = Message::builder()