refactor: clippy lints

This commit is contained in:
Max Hohlfeld 2025-09-01 09:36:19 +02:00
parent 465d6b0f0a
commit 5ebf1fa05a
5 changed files with 6 additions and 6 deletions

View File

@ -58,12 +58,12 @@ impl EventForCalendar {
assignments: record
.assignments
.as_ref()
.and_then(|f| Some(f.to_vec()))
.map(|f| f.to_vec())
.unwrap_or_default(),
vehicle_assignments: record
.vehicles
.as_ref()
.and_then(|f| Some(f.to_vec()))
.map(|f| f.to_vec())
.unwrap_or_default(),
})
.collect();

View File

@ -64,7 +64,7 @@ async fn handle_cross_areal(
let assignments_for_availability =
Assignment::read_all_by_availability(pool.get_ref(), availability.id).await?;
if !cross_areal && assignments_for_availability.len() != 0 {
if !cross_areal && !assignments_for_availability.is_empty() {
let trigger = json!({
"showToast": {
"type": "danger",

View File

@ -25,7 +25,7 @@ impl Mailer {
&self.hostname,
&user.name,
&user.email,
&assigned_function,
assigned_function,
event,
)?;
self.transport.send(message).await?;

View File

@ -25,7 +25,7 @@ impl Mailer {
&self.hostname,
&user.name,
&user.email,
&assigned_function,
assigned_function,
event,
)?;
self.transport.send(message).await?;

View File

@ -49,7 +49,7 @@ where
self
}
pub fn build<'a>(&'a mut self) -> PasswordChange<'a, T> {
pub fn build(&mut self) -> PasswordChange<T> {
PasswordChange {
pool: self.pool,
user_id: self.user_id,