diff --git a/bin/admin-panel/src/http/api/workspace/invites.rs b/bin/admin-panel/src/http/api/workspace/invites.rs index fbeb1a6..972e4a1 100644 --- a/bin/admin-panel/src/http/api/workspace/invites.rs +++ b/bin/admin-panel/src/http/api/workspace/invites.rs @@ -96,7 +96,7 @@ pub async fn invite( let invite = create_workspace_member_invite( data.db.clone(), crate::database::repositories::workspace_invite::WorkspaceMembersInviteCreate { - workspace_id: workspace_id, + workspace_id, email: body.email.clone(), expires, }, @@ -125,7 +125,6 @@ pub async fn accept_invite( workspace_id: Some(params.workspace_id.clone()), email: Some(email.clone()), id: Some(params.invite_id), - ..Default::default() }, ) .await?; @@ -176,7 +175,6 @@ pub async fn decline_invite( workspace_id: Some(params.workspace_id.clone()), email: Some(email.clone()), id: Some(params.invite_id), - ..Default::default() }, ) .await?; diff --git a/bin/admin-panel/src/http/middleware/clerk_auth.rs b/bin/admin-panel/src/http/middleware/clerk_auth.rs index 7ff39b5..a47486a 100644 --- a/bin/admin-panel/src/http/middleware/clerk_auth.rs +++ b/bin/admin-panel/src/http/middleware/clerk_auth.rs @@ -35,7 +35,7 @@ pub struct RequestWrapper<'a> { pub req: &'a Request, } -impl<'a> ClerkRequest for RequestWrapper<'a> { +impl ClerkRequest for RequestWrapper<'_> { fn get_header(&self, key: &str) -> Option { self.req .headers() diff --git a/bin/admin-panel/src/http/middleware/workspace.rs b/bin/admin-panel/src/http/middleware/workspace.rs index 74d7fef..901003c 100644 --- a/bin/admin-panel/src/http/middleware/workspace.rs +++ b/bin/admin-panel/src/http/middleware/workspace.rs @@ -80,10 +80,10 @@ impl Endpoint for WorkspaceMiddlewareImpl { } Err(err) => { log::error!("Error: {:?}", err); - return Err(Error::from_string( + Err(Error::from_string( "internal server error", StatusCode::INTERNAL_SERVER_ERROR, - )); + )) } } } diff --git a/bin/admin-panel/src/http/view.rs b/bin/admin-panel/src/http/view.rs index c718543..c44c610 100644 --- a/bin/admin-panel/src/http/view.rs +++ b/bin/admin-panel/src/http/view.rs @@ -16,6 +16,7 @@ pub fn build_frontend_route() -> Route { .finish(); // Finishes constructing the configuration log::info!("Running in development mode, starting Vite dev server..."); + #[allow(clippy::zombie_processes)] std::process::Command::new("pnpm") .current_dir("./view/") .args(["run", "dev"]) diff --git a/bin/admin-panel/src/services/clerk_user.rs b/bin/admin-panel/src/services/clerk_user.rs index 447f1c3..5ee463f 100644 --- a/bin/admin-panel/src/services/clerk_user.rs +++ b/bin/admin-panel/src/services/clerk_user.rs @@ -51,7 +51,7 @@ impl ClerkUserService { match user { Some(user) => match user.email_addresses { Some(emails) => { - if emails.len() > 0 { + if !emails.is_empty() { Ok(emails[0].email_address.clone()) } else { anyhow::bail!("User has no email addresses")