refactor
This commit is contained in:
parent
5d7432e46a
commit
f29f87fb37
2 changed files with 4 additions and 2 deletions
|
@ -76,6 +76,10 @@ async fn update(mut current: Revision, target: Revision) -> Result<(), UpdateErr
|
||||||
|
|
||||||
/// Updates config file revision from `target - 1` to `target`.
|
/// Updates config file revision from `target - 1` to `target`.
|
||||||
async fn update_one_revision(target: Revision) -> Result<(), UpdateError> {
|
async fn update_one_revision(target: Revision) -> Result<(), UpdateError> {
|
||||||
|
println!(
|
||||||
|
"Updating the config to revision {}...",
|
||||||
|
target.clone() as u8
|
||||||
|
);
|
||||||
match target {
|
match target {
|
||||||
Revision::V0 => unreachable!(),
|
Revision::V0 => unreachable!(),
|
||||||
Revision::V1 => v1::run().await?,
|
Revision::V1 => v1::run().await?,
|
||||||
|
|
|
@ -32,8 +32,6 @@ pub(crate) enum Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) async fn run() -> Result<(), Error> {
|
pub(super) async fn run() -> Result<(), Error> {
|
||||||
println!("Updating the config to revision 1...");
|
|
||||||
|
|
||||||
let (default_yml, meta) = read_old_config().await?;
|
let (default_yml, meta) = read_old_config().await?;
|
||||||
|
|
||||||
let server_config = create_new_server_config(default_yml, &meta)?;
|
let server_config = create_new_server_config(default_yml, &meta)?;
|
||||||
|
|
Loading…
Reference in a new issue