Skip to content

Commit 884d0fb

Browse files
Fix clippy warnings
- Remove unused imports in export.rs, claude.rs, email.rs - Remove needless borrows in error responses - Replace useless vec! with array in email_templates.rs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent d97a63c commit 884d0fb

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

src/handlers/email_templates.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub async fn create_email_template(
101101
}
102102

103103
// Validate template_type is a valid enum value
104-
let valid_types = vec![
104+
let valid_types = [
105105
"submission_confirmation",
106106
"talk_accepted",
107107
"talk_rejected",
@@ -112,7 +112,7 @@ pub async fn create_email_template(
112112
if !valid_types.contains(&payload.template_type.as_str()) {
113113
return Err((
114114
StatusCode::BAD_REQUEST,
115-
Json(ErrorResponse::new(&format!(
115+
Json(ErrorResponse::new(format!(
116116
"Invalid template type. Must be one of: {}",
117117
valid_types.join(", ")
118118
))),

src/handlers/export.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
77
use sqlx::Row;
88
use uuid::Uuid;
99

10-
use crate::{api::AppState, models::talk::TalkState};
10+
use crate::api::AppState;
1111

1212
#[derive(Debug, Deserialize)]
1313
pub struct ExportQuery {

src/handlers/talks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ pub async fn change_talk_state(
648648
if !talk.state.can_transition_to(&payload.new_state) {
649649
return Err((
650650
StatusCode::BAD_REQUEST,
651-
Json(ErrorResponse::new(&format!(
651+
Json(ErrorResponse::new(format!(
652652
"Invalid state transition: cannot move from {:?} to {:?}",
653653
talk.state, payload.new_state
654654
))),

src/services/claude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use reqwest::Client;
22
use serde::{Deserialize, Serialize};
3-
use serde_json::json;
43

54
use crate::config::Config;
65

src/services/email.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use lettre::{
44
AsyncTransport, Message, Tokio1Executor,
55
};
66
use serde::{Deserialize, Serialize};
7-
use serde_json::json;
87
use sqlx::PgPool;
98
use std::{collections::HashMap, sync::Arc};
109
use uuid::Uuid;

0 commit comments

Comments
 (0)