From f29f87fb3760ac486924bde59980979d2a1a936a Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 21 Jun 2024 18:51:46 +0900 Subject: [PATCH] refactor --- src/command/config/update.rs | 4 ++++ src/command/config/update/v1.rs | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/command/config/update.rs b/src/command/config/update.rs index 9151da2..4c25cca 100644 --- a/src/command/config/update.rs +++ b/src/command/config/update.rs @@ -76,6 +76,10 @@ async fn update(mut current: Revision, target: Revision) -> Result<(), UpdateErr /// Updates config file revision from `target - 1` to `target`. async fn update_one_revision(target: Revision) -> Result<(), UpdateError> { + println!( + "Updating the config to revision {}...", + target.clone() as u8 + ); match target { Revision::V0 => unreachable!(), Revision::V1 => v1::run().await?, diff --git a/src/command/config/update/v1.rs b/src/command/config/update/v1.rs index 693ecd3..3872913 100644 --- a/src/command/config/update/v1.rs +++ b/src/command/config/update/v1.rs @@ -32,8 +32,6 @@ pub(crate) enum Error { } pub(super) async fn run() -> Result<(), Error> { - println!("Updating the config to revision 1..."); - let (default_yml, meta) = read_old_config().await?; let server_config = create_new_server_config(default_yml, &meta)?;