cargo fix lint
This commit is contained in:
parent
c499672dde
commit
d0a02c2f61
@ -1,16 +1,13 @@
|
||||
use std::fs::File;
|
||||
|
||||
use async_graphql::{
|
||||
connection::{self, Connection, Edge},
|
||||
connection::{Connection},
|
||||
Context, EmptySubscription, Enum, Error, FieldResult, Object, Schema, SimpleObject, Union,
|
||||
};
|
||||
use log::{error, info, warn};
|
||||
use mailparse::{parse_mail, MailHeader, MailHeaderMap, ParsedMail};
|
||||
use memmap::MmapOptions;
|
||||
use log::info;
|
||||
use notmuch::Notmuch;
|
||||
use sqlx::postgres::PgPool;
|
||||
|
||||
use crate::{error::ServerError, linkify_html, newsreader, nm, sanitize_html};
|
||||
use crate::{newsreader, nm};
|
||||
|
||||
/// # Number of seconds since the Epoch
|
||||
pub type UnixTime = isize;
|
||||
|
||||
@ -50,7 +50,8 @@ pub async fn search(
|
||||
first,
|
||||
last,
|
||||
|after, before, first, last| async move {
|
||||
let rows = sqlx::query_file!("sql/threads.sql", site, query.unread_only)
|
||||
info!("search page info {after:#?}, {before:#?}, {first:#?}, {last:#?}");
|
||||
let rows = sqlx::query_file!("sql/threads.sql", site, query.unread_only,)
|
||||
.fetch_all(pool)
|
||||
.await?;
|
||||
|
||||
@ -91,10 +92,7 @@ pub async fn search(
|
||||
}
|
||||
|
||||
pub async fn tags(pool: &PgPool, needs_unread: bool) -> Result<Vec<Tag>, ServerError> {
|
||||
// TODO: write separate query for needs_unread.
|
||||
let tags = sqlx::query_file!("sql/tags.sql", needs_unread)
|
||||
.fetch_all(pool)
|
||||
.await?;
|
||||
let tags = sqlx::query_file!("sql/tags.sql").fetch_all(pool).await?;
|
||||
let tags = tags
|
||||
.into_iter()
|
||||
.map(|tag| {
|
||||
|
||||
@ -5,10 +5,7 @@ use std::{
|
||||
time::Instant,
|
||||
};
|
||||
|
||||
use async_graphql::{
|
||||
connection::{self, Connection, Edge},
|
||||
Context, EmptySubscription, Enum, FieldResult, Object, Schema, SimpleObject, Union,
|
||||
};
|
||||
use async_graphql::connection::{self, Connection, Edge};
|
||||
use log::{error, info, warn};
|
||||
use mailparse::{parse_mail, MailHeader, MailHeaderMap, ParsedMail};
|
||||
use memmap::MmapOptions;
|
||||
@ -20,7 +17,7 @@ use crate::{
|
||||
Attachment, Body, DispositionType, Email, Header, Html, Message, PlainText, Tag, Thread,
|
||||
ThreadSummary, UnhandledContentType,
|
||||
},
|
||||
linkify_html, newsreader, nm, sanitize_html,
|
||||
linkify_html, sanitize_html,
|
||||
};
|
||||
|
||||
const TEXT_PLAIN: &'static str = "text/plain";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user