From 8f7237c34a8008f9c0e05358048a8dfd71bdc049 Mon Sep 17 00:00:00 2001 From: CrabeDeFrance Date: Mon, 4 Dec 2023 16:03:51 +0100 Subject: [PATCH] Issue #183 : fix fmt --- crates/alexandrie/src/frontend/categories.rs | 10 +++++----- crates/alexandrie/src/frontend/keywords.rs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/alexandrie/src/frontend/categories.rs b/crates/alexandrie/src/frontend/categories.rs index 44448b36..e8dcb318 100644 --- a/crates/alexandrie/src/frontend/categories.rs +++ b/crates/alexandrie/src/frontend/categories.rs @@ -1,12 +1,12 @@ use std::num::NonZeroU32; use std::sync::Arc; -use axum::extract::{Path, State, Query}; +use axum::extract::{Path, Query, State}; use axum::response::Redirect; use axum_extra::either::Either; use axum_extra::response::Html; -use diesel::prelude::*; use diesel::dsl as sql; +use diesel::prelude::*; use json::json; use serde::{Deserialize, Serialize}; @@ -69,7 +69,7 @@ pub(crate) async fn get( .limit(15) .offset(15 * i64::from(page_number - 1)) .load::(conn)?; - + let results = results .into_iter() .map(|crate_ids| { @@ -82,7 +82,7 @@ pub(crate) async fn get( let categorie_crate: Crate = crates::table .filter(crates::id.eq(crate_ids)) .first(conn)?; - + Ok((categorie_crate, categories)) }) .collect::)>, Error>>()?; @@ -107,7 +107,7 @@ pub(crate) async fn get( let next_page = paginated_url(&categorie, page_number + 1, page_count); let prev_page = paginated_url(&categorie, page_number - 1, page_count); - + let auth = &state.frontend.config.auth; let engine = &state.frontend.handlebars; let context = json!({ diff --git a/crates/alexandrie/src/frontend/keywords.rs b/crates/alexandrie/src/frontend/keywords.rs index 0a3f3c14..bc7694cb 100644 --- a/crates/alexandrie/src/frontend/keywords.rs +++ b/crates/alexandrie/src/frontend/keywords.rs @@ -1,12 +1,12 @@ use std::num::NonZeroU32; use std::sync::Arc; -use axum::extract::{Path, State, Query}; +use axum::extract::{Path, Query, State}; use axum::response::Redirect; use axum_extra::either::Either; use axum_extra::response::Html; -use diesel::prelude::*; use diesel::dsl as sql; +use diesel::prelude::*; use json::json; use serde::{Deserialize, Serialize}; @@ -70,7 +70,7 @@ pub(crate) async fn get( .limit(15) .offset(15 * i64::from(page_number - 1)) .load::(conn)?; - + let results = results .into_iter() .map(|crate_ids| { @@ -83,7 +83,7 @@ pub(crate) async fn get( let keyword_crate: Crate = crates::table .filter(crates::id.eq(crate_ids)) .first(conn)?; - + Ok((keyword_crate, keywords)) }) .collect::)>, Error>>()?;