version -> revision

This commit is contained in:
naskya 2024-06-21 03:31:13 +09:00
parent 939bb1c72f
commit db8dfa6655
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 4 additions and 4 deletions

View file

@ -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()?,
}

View file

@ -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?,
}