Archived
1
0
Fork 0

refac: remove unused vars

This commit is contained in:
Dmitriy Pleshevskiy 2021-02-15 23:23:35 +03:00
parent 92c07f4181
commit 9679519380
2 changed files with 6 additions and 7 deletions

View file

@ -1,10 +1,7 @@
use crate::config::Config; use crate::config::Config;
use crate::database::{DatabaseConnection, PostgresConnection}; use crate::database::{DatabaseConnection, PostgresConnection};
use crate::error::{ErrorKind, StdResult}; use crate::error::{ErrorKind, StdResult};
use crate::migration::{ use crate::migration::{filter_pending_migrations, Migration, MigrationManager, MigrationNames};
filter_pending_migrations, DatabaseMigrationManager, Migration, MigrationManager,
MigrationNames,
};
const EM_DASH: char = '—'; const EM_DASH: char = '—';

View file

@ -108,16 +108,18 @@ where
r#"CREATE TABLE IF NOT EXISTS migrations ( r#"CREATE TABLE IF NOT EXISTS migrations (
id serial PRIMARY KEY, id serial PRIMARY KEY,
name text NOT NULL UNIQUE name text NOT NULL UNIQUE
)"# )"#,
) )
} }
fn insert_migration_info(&mut self, name: &str) -> StdResult<u64> { fn insert_migration_info(&mut self, name: &str) -> StdResult<u64> {
self.conn.execute("INSERT INTO migrations (name) VALUES ($1)", &[&name]) self.conn
.execute("INSERT INTO migrations (name) VALUES ($1)", &[&name])
} }
fn delete_migration_info(&mut self, name: &str) -> StdResult<u64> { fn delete_migration_info(&mut self, name: &str) -> StdResult<u64> {
self.conn.execute("DELETE FROM migrations WHERE name = $1", &[&name]) self.conn
.execute("DELETE FROM migrations WHERE name = $1", &[&name])
} }
} }