Skip to content

Commit

Permalink
StyleIdToModelInnerIdをnewtype化する
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Mar 14, 2024
1 parent 7ccb2a3 commit 2521744
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/voicevox_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ open_jtalk.workspace = true
ouroboros.workspace = true
rayon.workspace = true
regex.workspace = true
serde = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive", "rc"] }
serde_json = { workspace = true, features = ["preserve_order"] }
smallvec.workspace = true
strum = { workspace = true, features = ["derive"] }
Expand Down
7 changes: 5 additions & 2 deletions crates/voicevox_core/src/manifest.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::{collections::BTreeMap, fmt::Display};
use std::{collections::BTreeMap, fmt::Display, sync::Arc};

use derive_getters::Getters;
use derive_more::Deref;
use derive_new::new;
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -53,4 +54,6 @@ pub(crate) struct TalkManifest {
pub(crate) style_id_to_model_inner_id: StyleIdToModelInnerId,
}

pub(crate) type StyleIdToModelInnerId = BTreeMap<StyleId, ModelInnerId>;
#[derive(Default, Clone, Deref, Deserialize)]
#[deref(forward)]
pub(crate) struct StyleIdToModelInnerId(Arc<BTreeMap<StyleId, ModelInnerId>>);

0 comments on commit 2521744

Please sign in to comment.