Skip to content

Commit

Permalink
default_valueの値を定数に切り出す
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Oct 13, 2023
1 parent 1824208 commit b6156ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/download/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const DEFAULT_OUTPUT: &str = if cfg!(windows) {
};

const LIB_NAME: &str = "voicevox_core";
const DEFAULT_CORE_REPO: &str = "VOICEVOX/voicevox_core";
const DEFAULT_ADDITIONAL_LIBRARIES_REPO: &str = "VOICEVOX/voicevox_additional_libraries";

static OPEN_JTALK_DIC_URL: Lazy<Url> = Lazy::new(|| {
"https://jaist.dl.sourceforge.net/project/open-jtalk/Dictionary/open_jtalk_dic-1.11/open_jtalk_dic_utf_8-1.11.tar.gz"
Expand Down Expand Up @@ -74,17 +76,13 @@ struct Args {
#[arg(value_enum, long, default_value(Os::default_opt().map(<&str>::from)))]
os: Os,

#[arg(
long,
value_name("REPOSITORY"),
default_value("VOICEVOX/voicevox_core")
)]
#[arg(long, value_name("REPOSITORY"), default_value(DEFAULT_CORE_REPO))]
core_repo: RepoName,

#[arg(
long,
value_name("REPOSITORY"),
default_value("VOICEVOX/voicevox_additional_libraries")
default_value(DEFAULT_ADDITIONAL_LIBRARIES_REPO)
)]
additional_libraries_repo: RepoName,
}
Expand Down

0 comments on commit b6156ba

Please sign in to comment.