Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
Co-authored-by: Georg Semmler <[email protected]>
  • Loading branch information
Ten0 and weiznich authored Jul 19, 2022
1 parent 71853b6 commit 7c5d6b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diesel_migrations/src/file_based_migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ impl<DB: Backend> Migration<DB> for SqlFileMigration {

fn revert(&self, conn: &mut dyn BoxableConnection<DB>) -> migration::Result<()> {
let down_path = self.base_path.join("down.sql");
if !matches!(down_path.metadata(), Err(e) if e.kind() == std::io::ErrorKind::NotFound) {
Ok(run_sql_from_file(conn, &down_path, &self.name)?)
} else {
if matches!(down_path.metadata(), Err(e) if e.kind() == std::io::ErrorKind::NotFound) {
Err(MigrationError::NoMigrationRevertFile.into())
} else {
Ok(run_sql_from_file(conn, &down_path, &self.name)?)
}
}

Expand Down

0 comments on commit 7c5d6b3

Please sign in to comment.