Fix clippy warnings
This commit is contained in:
@@ -135,7 +135,6 @@ impl<'a> Object<'a> for User {
|
||||
}
|
||||
|
||||
pub struct NewUserIncident {
|
||||
pub incident: UserIncident,
|
||||
pub counting_incidents: usize,
|
||||
pub is_first_incident: bool,
|
||||
}
|
||||
@@ -246,9 +245,8 @@ impl User {
|
||||
incident.insert(session).await?;
|
||||
|
||||
Ok(NewUserIncident {
|
||||
incident,
|
||||
counting_incidents,
|
||||
is_first_incident: incidents.len() == 0,
|
||||
is_first_incident: incidents.is_empty(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user