Skip to content

Commit

Permalink
chore: [0.15] remove dead code and an obsolete workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Dec 15, 2024
1 parent 87df545 commit 336488d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
- name: Install cargo-edit
if: ${{ env.VERSION != 'DEBUG' }}
shell: bash
run: cargo binstall cargo-edit@^0.11 --no-confirm --log-level debug --locked # NOTE: release-0.15で追加
run: cargo binstall cargo-edit@^0.11 --no-confirm --log-level debug
- name: set cargo version
if: ${{ env.VERSION != 'DEBUG' }}
shell: bash
Expand Down
3 changes: 0 additions & 3 deletions crates/voicevox_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ pub enum Error {
)]
InvalidModelIndex { model_index: usize },

#[error("{}", base_error_message(VOICEVOX_RESULT_UNSUPPORTED_MODEL_ERROR))]
UnsupportedModel,

#[error("{}", base_error_message(VOICEVOX_RESULT_INFERENCE_ERROR))]
InferenceFailed,

Expand Down
3 changes: 0 additions & 3 deletions crates/voicevox_core/src/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ pub const fn error_result_to_message(result_code: VoicevoxResultCode) -> &'stati
VOICEVOX_RESULT_UNINITIALIZED_STATUS_ERROR => "Statusが初期化されていません\0",
VOICEVOX_RESULT_INVALID_SPEAKER_ID_ERROR => "無効なspeaker_idです\0",
VOICEVOX_RESULT_INVALID_MODEL_INDEX_ERROR => "無効なmodel_indexです\0",
VOICEVOX_RESULT_UNSUPPORTED_MODEL_ERROR => "未対応なモデルです\0",
VOICEVOX_RESULT_INFERENCE_ERROR => "推論に失敗しました\0",
VOICEVOX_RESULT_EXTRACT_FULL_CONTEXT_LABEL_ERROR => {
"入力テキストからのフルコンテキストラベル抽出に失敗しました\0"
Expand Down Expand Up @@ -1164,8 +1163,6 @@ mod tests {
assert_eq!(result.unwrap().len(), vowel_phoneme_vector.len());
}

// TODO: sing系のテストを足す

#[rstest]
fn decode_works() {
let internal = VoicevoxCore::new_with_mutex();
Expand Down
2 changes: 0 additions & 2 deletions crates/voicevox_core/src/result_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pub enum VoicevoxResultCode {
VOICEVOX_RESULT_INVALID_SPEAKER_ID_ERROR = 7,
/// 無効なmodel_indexが指定された
VOICEVOX_RESULT_INVALID_MODEL_INDEX_ERROR = 8,
/// 対応していないmodelが指定された
VOICEVOX_RESULT_UNSUPPORTED_MODEL_ERROR = 15,
/// 推論に失敗した
VOICEVOX_RESULT_INFERENCE_ERROR = 9,
/// コンテキストラベル出力に失敗した
Expand Down
1 change: 0 additions & 1 deletion crates/voicevox_core_c_api/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub(crate) fn into_result_code_with_error(result: CApiResult<()>) -> VoicevoxRes
Err(RustApi(UninitializedStatus)) => VOICEVOX_RESULT_UNINITIALIZED_STATUS_ERROR,
Err(RustApi(InvalidSpeakerId { .. })) => VOICEVOX_RESULT_INVALID_SPEAKER_ID_ERROR,
Err(RustApi(InvalidModelIndex { .. })) => VOICEVOX_RESULT_INVALID_MODEL_INDEX_ERROR,
Err(RustApi(UnsupportedModel { .. })) => VOICEVOX_RESULT_UNSUPPORTED_MODEL_ERROR,
Err(RustApi(InferenceFailed)) => VOICEVOX_RESULT_INFERENCE_ERROR,
Err(RustApi(ExtractFullContextLabel(_))) => {
VOICEVOX_RESULT_EXTRACT_FULL_CONTEXT_LABEL_ERROR
Expand Down

0 comments on commit 336488d

Please sign in to comment.