Skip to content

Commit

Permalink
Issue #183 : fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
CrabeDeFrance committed Dec 4, 2023
1 parent 96fb7b9 commit 8f7237c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions crates/alexandrie/src/frontend/categories.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -69,7 +69,7 @@ pub(crate) async fn get(
.limit(15)
.offset(15 * i64::from(page_number - 1))
.load::<i64>(conn)?;

let results = results
.into_iter()
.map(|crate_ids| {
Expand All @@ -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::<Result<Vec<(Crate, Vec<String>)>, Error>>()?;
Expand All @@ -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!({
Expand Down
8 changes: 4 additions & 4 deletions crates/alexandrie/src/frontend/keywords.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -70,7 +70,7 @@ pub(crate) async fn get(
.limit(15)
.offset(15 * i64::from(page_number - 1))
.load::<i64>(conn)?;

let results = results
.into_iter()
.map(|crate_ids| {
Expand All @@ -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::<Result<Vec<(Crate, Vec<String>)>, Error>>()?;
Expand Down

0 comments on commit 8f7237c

Please sign in to comment.