refactor: clippy lints
This commit is contained in:
parent
465d6b0f0a
commit
5ebf1fa05a
@ -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();
|
||||
|
@ -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",
|
||||
|
@ -25,7 +25,7 @@ impl Mailer {
|
||||
&self.hostname,
|
||||
&user.name,
|
||||
&user.email,
|
||||
&assigned_function,
|
||||
assigned_function,
|
||||
event,
|
||||
)?;
|
||||
self.transport.send(message).await?;
|
||||
|
@ -25,7 +25,7 @@ impl Mailer {
|
||||
&self.hostname,
|
||||
&user.name,
|
||||
&user.email,
|
||||
&assigned_function,
|
||||
assigned_function,
|
||||
event,
|
||||
)?;
|
||||
self.transport.send(message).await?;
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user