Compare commits

..

No commits in common. "607e9e22513bb93a42b621b9005d2f86175c3fb5" and "94c03a9c7cb3528457a3c53d28623abe201df5ed" have entirely different histories.

8 changed files with 12 additions and 17 deletions

10
Cargo.lock generated
View File

@ -2509,7 +2509,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "letterbox"
version = "0.0.66"
version = "0.0.65"
dependencies = [
"build-info",
"build-info-build",
@ -3024,7 +3024,7 @@ dependencies = [
[[package]]
name = "notmuch"
version = "0.0.66"
version = "0.0.65"
dependencies = [
"itertools 0.10.5",
"log",
@ -3810,7 +3810,7 @@ dependencies = [
[[package]]
name = "procmail2notmuch"
version = "0.0.66"
version = "0.0.65"
dependencies = [
"anyhow",
]
@ -4782,7 +4782,7 @@ dependencies = [
[[package]]
name = "server"
version = "0.0.66"
version = "0.0.65"
dependencies = [
"ammonia",
"anyhow",
@ -4882,7 +4882,7 @@ dependencies = [
[[package]]
name = "shared"
version = "0.0.66"
version = "0.0.65"
dependencies = [
"build-info",
"notmuch",

View File

@ -1,6 +1,6 @@
[package]
name = "notmuch"
version = "0.0.66"
version = "0.0.65"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "procmail2notmuch"
version = "0.0.66"
version = "0.0.65"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.0.66"
version = "0.0.65"
edition = "2021"
default-run = "server"

View File

@ -7,7 +7,6 @@ use scraper::Selector;
use shared::compute_color;
use sqlx::postgres::PgPool;
use tokio::sync::Mutex;
use tracing::instrument;
use url::Url;
use crate::{
@ -53,7 +52,6 @@ fn site_from_tags(tags: &[String]) -> Option<String> {
None
}
#[instrument(name = "newsreader::count", skip_all, fields(query=%query))]
pub async fn count(pool: &PgPool, query: &Query) -> Result<usize, ServerError> {
if !is_newsreader_query(query) {
return Ok(0);
@ -77,7 +75,6 @@ pub async fn count(pool: &PgPool, query: &Query) -> Result<usize, ServerError> {
Ok(row.count.unwrap_or(0).try_into().unwrap_or(0))
}
#[instrument(name = "newsreader::search", skip_all, fields(query=%query))]
pub async fn search(
pool: &PgPool,
after: Option<i32>,
@ -144,7 +141,6 @@ pub async fn search(
}
Ok(res)
}
#[instrument(name = "newsreader::tags", skip_all, fields(needs_unread=%_needs_unread))]
pub async fn tags(pool: &PgPool, _needs_unread: bool) -> Result<Vec<Tag>, ServerError> {
// TODO: optimize query by using needs_unread
let tags = sqlx::query_file!("sql/tags.sql").fetch_all(pool).await?;
@ -168,7 +164,6 @@ pub async fn tags(pool: &PgPool, _needs_unread: bool) -> Result<Vec<Tag>, Server
Ok(tags)
}
#[instrument(name = "newsreader::thread", skip_all, fields(thread_id=%thread_id))]
pub async fn thread(
config: &Config,
pool: &PgPool,
@ -285,7 +280,6 @@ pub async fn thread(
timestamp,
}))
}
#[instrument(name = "newsreader::set_read_status", skip_all, fields(query=%query,unread=%unread))]
pub async fn set_read_status<'ctx>(
pool: &PgPool,
query: &Query,

View File

@ -143,7 +143,8 @@ impl TantivyConnection {
rows.len()
);
}
for r in rows {
let total = rows.len();
for (i, r) in rows.into_iter().enumerate() {
let id_term = Term::from_field_text(uid, &r.uid);
index_writer.delete_term(id_term);
let slug = r.site;

View File

@ -1,6 +1,6 @@
[package]
name = "shared"
version = "0.0.66"
version = "0.0.65"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,5 +1,5 @@
[package]
version = "0.0.66"
version = "0.0.65"
name = "letterbox"
repository = "https://github.com/seed-rs/seed-quickstart"
authors = ["Bill Thiede <git@xinu.tv>"]