Archived
1
0
Fork 0

chore: return new fn for migration manager

This commit is contained in:
Dmitriy Pleshevskiy 2021-05-16 17:01:41 +03:00
parent 285d1778b4
commit 7ae88ce3d3

View file

@ -55,11 +55,17 @@ pub struct MigrationManager {
migrations_table_name: String, migrations_table_name: String,
} }
impl MigrationManager {
fn new(migrations_table_name: &str) -> Self {
MigrationManager {
migrations_table_name: migrations_table_name.to_owned(),
}
}
}
impl From<&Config> for MigrationManager { impl From<&Config> for MigrationManager {
fn from(config: &Config) -> Self { fn from(config: &Config) -> Self {
MigrationManager { MigrationManager::new(&config.migrations.table_name())
migrations_table_name: config.migrations.table_name(),
}
} }
} }