clippy: adhere to pedantic clippy, uniform test error handling

This commit is contained in:
Per Stark
2026-05-26 11:43:45 +02:00
parent 6a5d631287
commit 000852c94c
68 changed files with 2468 additions and 2547 deletions
+5 -4
View File
@@ -102,13 +102,13 @@ pub async fn show_text_content_edit_form(
RequireUser(user): RequireUser,
Path(id): Path<String>,
) -> Result<impl IntoResponse, HtmlError> {
let text_content = User::get_and_validate_text_content(&id, &user.id, &state.db).await?;
#[derive(Serialize)]
pub struct TextContentEditModal {
pub text_content: TextContent,
}
let text_content = User::get_and_validate_text_content(&id, &user.id, &state.db).await?;
Ok(TemplateResponse::new_template(
"content/edit_text_content_modal.html",
TextContentEditModal { text_content },
@@ -214,13 +214,14 @@ pub async fn show_content_read_modal(
RequireUser(user): RequireUser,
Path(id): Path<String>,
) -> Result<impl IntoResponse, HtmlError> {
// Get and validate the text content
let text_content = User::get_and_validate_text_content(&id, &user.id, &state.db).await?;
#[derive(Serialize)]
pub struct TextContentReadModalData {
pub text_content: TextContent,
}
// Get and validate the text content
let text_content = User::get_and_validate_text_content(&id, &user.id, &state.db).await?;
Ok(TemplateResponse::new_template(
"content/read_content_modal.html",
TextContentReadModalData { text_content },