chore: pedantic clippy stuff

This commit is contained in:
Per Stark
2025-01-10 20:47:18 +01:00
parent 7ad8e694c6
commit 8b44a720a1
3 changed files with 3 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ use tracing_subscriber::{fmt, prelude::*, EnvFilter};
use zettle_db::{
ingress::{
content_processor::ContentProcessor,
jobqueue::{self, JobQueue, MAX_ATTEMPTS},
jobqueue::{JobQueue, MAX_ATTEMPTS},
},
storage::{
db::{get_item, SurrealDbClient},

View File

@@ -186,7 +186,7 @@ impl IngressObject {
let content = if token_count > MAX_TOKENS {
// Split content into structural blocks
let blocks: Vec<&str> = content.split(|c| c == '\n').collect();
let blocks: Vec<&str> = content.split('\n').collect();
let mut truncated = String::new();
let mut current_tokens = 0;

View File

@@ -2,10 +2,7 @@ use crate::{
error::{AppError, HtmlError},
page_data,
server::AppState,
storage::types::{
job::{Job, JobStatus},
user::User,
},
storage::types::{job::Job, user::User},
};
use axum::{
extract::{Path, State},
@@ -14,7 +11,6 @@ use axum::{
use axum_session_auth::AuthSession;
use axum_session_surreal::SessionSurrealPool;
use surrealdb::{engine::any::Any, Surreal};
use tracing::info;
use super::render_template;
@@ -35,13 +31,6 @@ pub async fn show_queue_tasks(
.await
.map_err(|e| HtmlError::new(e, state.templates.clone()))?;
for job in &jobs {
match job.status {
JobStatus::Created => info!("Found a created job"),
_ => continue,
}
}
let rendered = render_template(
ShowQueueTasks::template_name(),
ShowQueueTasks { jobs, user },