Fix clippy lints

This commit is contained in:
Daniel García
2021-06-19 22:02:03 +02:00
parent ff0fee3690
commit 9254cf9d9c
23 changed files with 163 additions and 166 deletions

View File

@ -227,15 +227,15 @@ impl Send {
/// Purge all sends that are past their deletion date.
pub fn purge(conn: &DbConn) {
for send in Self::find_by_past_deletion_date(&conn) {
send.delete(&conn).ok();
for send in Self::find_by_past_deletion_date(conn) {
send.delete(conn).ok();
}
}
pub fn update_users_revision(&self, conn: &DbConn) {
match &self.user_uuid {
Some(user_uuid) => {
User::update_uuid_revision(&user_uuid, conn);
User::update_uuid_revision(user_uuid, conn);
}
None => {
// Belongs to Organization, not implemented
@ -244,8 +244,8 @@ impl Send {
}
pub fn delete_all_by_user(user_uuid: &str, conn: &DbConn) -> EmptyResult {
for send in Self::find_by_user(user_uuid, &conn) {
send.delete(&conn)?;
for send in Self::find_by_user(user_uuid, conn) {
send.delete(conn)?;
}
Ok(())
}