From e4d3bfc680bccf7c6f908e096349bafd1f55bbb8 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Sun, 11 Feb 2024 14:12:11 -0600 Subject: [PATCH] lints --- crates/site-app/src/pages/auth/signup_page.rs | 2 +- crates/site-app/src/utils.rs | 4 +--- crates/site-server/src/fileserv.rs | 5 +---- crates/site-server/src/main.rs | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/crates/site-app/src/pages/auth/signup_page.rs b/crates/site-app/src/pages/auth/signup_page.rs index f8f8499..9131ad9 100644 --- a/crates/site-app/src/pages/auth/signup_page.rs +++ b/crates/site-app/src/pages/auth/signup_page.rs @@ -1,4 +1,4 @@ -use leptos::{logging::log, *}; +use leptos::*; use crate::pages::SmallPageWrapper; diff --git a/crates/site-app/src/utils.rs b/crates/site-app/src/utils.rs index a2db3c2..088d8f4 100644 --- a/crates/site-app/src/utils.rs +++ b/crates/site-app/src/utils.rs @@ -1,7 +1,5 @@ use leptos::*; pub fn authenticated_user() -> Option { - use_context::() - .map(|u| u.0) - .flatten() + use_context::().and_then(|u| u.0) } diff --git a/crates/site-server/src/fileserv.rs b/crates/site-server/src/fileserv.rs index 33c2037..b4855ec 100644 --- a/crates/site-server/src/fileserv.rs +++ b/crates/site-server/src/fileserv.rs @@ -5,10 +5,7 @@ use axum::{ response::{IntoResponse, Response as AxumResponse}, }; use leptos::*; -use site_app::{ - error_template::{AppError, ErrorTemplate}, - App, -}; +use site_app::App; use tower::ServiceExt; use tower_http::services::ServeDir; diff --git a/crates/site-server/src/main.rs b/crates/site-server/src/main.rs index 7e77e51..3423016 100644 --- a/crates/site-server/src/main.rs +++ b/crates/site-server/src/main.rs @@ -3,7 +3,7 @@ use axum::{ extract::{FromRef, Path, State}, http::Request, response::{IntoResponse, Response}, - routing::{get, post}, + routing::get, Router, }; use color_eyre::eyre::Result; @@ -26,7 +26,6 @@ pub struct AppState { } async fn server_fn_handler( - State(app_state): State, auth_session: auth::AuthSession, path: Path, request: Request,