Browse Source

Fix clippy warnings

pull/3/head
Alex Mikhalev 4 years ago
parent
commit
964c30b8b9
  1. 4
      src/migrations.rs

4
src/migrations.rs

@ -136,11 +136,11 @@ impl Migrations {
return Err(MigrationError::VersionTooNew(db_version)); return Err(MigrationError::VersionTooNew(db_version));
} }
let mig_range = self.migrations.range((Excluded(db_version), Unbounded)); let mig_range = self.migrations.range((Excluded(db_version), Unbounded));
let mut trans = conn.transaction()?; let trans = conn.transaction()?;
let mut last_ver: MigrationVersion = NO_MIGRATIONS; let mut last_ver: MigrationVersion = NO_MIGRATIONS;
for (ver, mig) in mig_range { for (ver, mig) in mig_range {
debug!(version = ver, "applying migration version"); debug!(version = ver, "applying migration version");
mig.up(&mut trans)?; mig.up(&trans)?;
last_ver = *ver; last_ver = *ver;
} }
if last_ver != NO_MIGRATIONS { if last_ver != NO_MIGRATIONS {

Loading…
Cancel
Save