diff --git a/pgml-dashboard/src/components/notifications/banner/mod.rs b/pgml-dashboard/src/components/notifications/banner/mod.rs index 94477389c..e6c0d1af6 100644 --- a/pgml-dashboard/src/components/notifications/banner/mod.rs +++ b/pgml-dashboard/src/components/notifications/banner/mod.rs @@ -1,4 +1,4 @@ -use crate::{Notification, NotificationLevel}; +use crate::Notification; use pgml_components::component; use sailfish::TemplateOnce; diff --git a/pgml-dashboard/src/lib.rs b/pgml-dashboard/src/lib.rs index f96717045..2d84fddc2 100644 --- a/pgml-dashboard/src/lib.rs +++ b/pgml-dashboard/src/lib.rs @@ -2,7 +2,7 @@ extern crate rocket; use rocket::form::Form; -use rocket::http::{Cookie, CookieJar}; +use rocket::http::CookieJar; use rocket::response::Redirect; use rocket::route::Route; use rocket::serde::json::Json; diff --git a/pgml-dashboard/src/utils/cookies.rs b/pgml-dashboard/src/utils/cookies.rs index 49c4aafe0..af791b0da 100644 --- a/pgml-dashboard/src/utils/cookies.rs +++ b/pgml-dashboard/src/utils/cookies.rs @@ -1,5 +1,4 @@ use rocket::http::{Cookie, CookieJar}; -use rocket::serde::json::Json; pub struct Notifications {} @@ -11,7 +10,7 @@ impl Notifications { } pub fn get_viewed(cookies: &CookieJar<'_>) -> Vec { - let mut viewed = match cookies.get_private("session") { + let viewed = match cookies.get_private("session") { Some(session) => { match serde_json::from_str::(session.value()).unwrap() ["notifications"] diff --git a/pgml-dashboard/templates/layout/base.html b/pgml-dashboard/templates/layout/base.html index c917decf7..cefc9329a 100644 --- a/pgml-dashboard/templates/layout/base.html +++ b/pgml-dashboard/templates/layout/base.html @@ -1,6 +1,5 @@ <% use crate::components::navigation::navbar::marketing::Marketing as MarketingNavbar; - use crate::components::notifications::Banner; %>