From db8dfa6655c8518dd93113eb6422ce616ce0c83f Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 21 Jun 2024 03:31:13 +0900 Subject: [PATCH] version -> revision --- src/command/config.rs | 4 ++-- src/command/config/migrate.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/config.rs b/src/command/config.rs index 9ed9f53..c9853e6 100644 --- a/src/command/config.rs +++ b/src/command/config.rs @@ -8,7 +8,7 @@ use clap::{Subcommand, ValueEnum}; #[derive(Subcommand)] pub(crate) enum Commands { /// Convert an old config file into the new format - Migrate { version: ConfigRevision }, + Migrate { revision: ConfigRevision }, /// Validate the config file Validate, } @@ -29,7 +29,7 @@ pub(crate) enum Error { pub(crate) async fn run(command: Commands) -> Result<(), Error> { match command { - Commands::Migrate { version } => migrate::run(version).await?, + Commands::Migrate { revision } => migrate::run(revision).await?, Commands::Validate => validate::run()?, } diff --git a/src/command/config/migrate.rs b/src/command/config/migrate.rs index eb2d5b7..90ce7ae 100644 --- a/src/command/config/migrate.rs +++ b/src/command/config/migrate.rs @@ -10,8 +10,8 @@ pub(crate) enum MigrationError { V20240701(#[from] v20240701::Error), } -pub(super) async fn run(version: ConfigRevision) -> Result<(), MigrationError> { - match version { +pub(super) async fn run(revision: ConfigRevision) -> Result<(), MigrationError> { + match revision { ConfigRevision::V20240701 => v20240701::run().await?, }