Skip to content

Commit b4766c4

Browse files
authored
1 parent fa9a1a6 commit b4766c4

File tree

9 files changed

+11
-9
lines changed

9 files changed

+11
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ rev = "de226a26e8e18edbdb1d6f986afe37bbbf35fbf4"
123123
version = "0.0.0"
124124
edition = "2024"
125125
publish = false
126-
rust-version = "1.88.0"
126+
rust-version = "1.91.0"
127127
license = "MIT"
128128

129129
# min-sized-rustを元にrelease buildのサイズが小さくなるようにした

crates/downloader/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{
44
env,
55
future::{self, Future},
66
io::{self, Cursor, IsTerminal as _, Read, Write as _},
7+
iter,
78
num::NonZero,
89
path::{Path, PathBuf},
910
str::FromStr,
@@ -580,7 +581,7 @@ async fn main() -> anyhow::Result<()> {
580581
.transpose()?;
581582

582583
ensure_confirmation(
583-
&itertools::chain(
584+
&iter::chain(
584585
models
585586
.as_ref()
586587
.map(|ModelsWithTerms { terms, .. }| &**terms)
@@ -833,7 +834,7 @@ fn find_onnxruntime(
833834
.and_then(|text| text.try_into().ok())
834835
.with_context(|| format!("リリースノート中の`{TARGET}`をパースできませんでした"))
835836
})
836-
.collect::<Result<Vec<[_; 4]>, _>>()?
837+
.collect::<Result<Vec<[_; _]>, _>>()?
837838
.into_iter()
838839
.filter(|&[spec_os, spec_cpu_arch, spec_devices, _]| {
839840
spec_os

crates/voicevox_core/src/engine/talk/interpret_query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl AudioQuery {
173173
let phoneme_id = phoneme_data_list[i].phoneme_id();
174174

175175
for _ in 0..phoneme_length {
176-
let mut phonemes_vec = [0.; OjtPhoneme::num_phoneme()];
176+
let mut phonemes_vec = [0.; OjtPhoneme::num_phoneme()]; // TODO: Rust 1.89であればサイズが型推論可能になる
177177
phonemes_vec[phoneme_id as usize] = 1.;
178178
phoneme.push(phonemes_vec)
179179
}

crates/voicevox_core/src/synthesizer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ impl AsyncExt for BlockingThreadPool {
151151

152152
const DEFAULT_SAMPLING_RATE: u32 = 24000;
153153
/// 音が途切れてしまうのを避けるworkaround処理のためのパディング幅(フレーム数)
154+
// TODO: Rust 1.90であれば`{float}::round`がそのまま使える
154155
const PADDING_FRAME_LENGTH: usize = 38; // (0.4秒 * 24000Hz / 256.0).round()
155156
/// 音声生成の際、音声特徴量の前後に確保すべきマージン幅(フレーム数)
156157
/// モデルの受容野から計算される

crates/voicevox_core_c_api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const_format.workspace = true
2929
duplicate.workspace = true
3030
easy-ext.workspace = true
3131
educe.workspace = true
32-
itertools.workspace = true
3332
libc.workspace = true
3433
ndarray.workspace = true
3534
parking_lot = { workspace = true, features = ["arc_lock"] }
@@ -50,6 +49,7 @@ duct.workspace = true
5049
easy-ext.workspace = true
5150
inventory.workspace = true
5251
indexmap = { workspace = true, features = ["serde"] }
52+
itertools.workspace = true
5353
libloading.workspace = true
5454
libtest-mimic.workspace = true
5555
ndarray.workspace = true

crates/voicevox_core_c_api/src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(crate) fn into_result_code_with_error(result: CApiResult<()>) -> VoicevoxRes
5959
}
6060

6161
pub(crate) fn display_error(err: &impl std::error::Error) {
62-
itertools::chain(
62+
iter::chain(
6363
[err.to_string()],
6464
iter::successors(err.source(), |&e| e.source()).map(|e| format!("Caused by: {e}")),
6565
)

crates/voicevox_core_c_api/tests/e2e/testcases/user_dict_load.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl assert_cdylib::TestCase for TestCase {
3434
// SAFETY: `voicevox_user_dict_new`には特にはsafety requirementsは無いはず。
3535
let dict = unsafe { lib.voicevox_user_dict_new() };
3636

37-
let mut word_uuid = [0u8; 16];
37+
let mut word_uuid = [0u8; _];
3838

3939
let word = {
4040
// SAFETY: `voicevox_user_dict_word_make` itself has no safety requirements.

crates/voicevox_core_c_api/tests/e2e/testcases/user_dict_manipulate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl assert_cdylib::TestCase for TestCase {
5252

5353
// FIXME: This closure itself should be `unsafe`.
5454
let add_word = |dict: *const VoicevoxUserDict, word: &VoicevoxUserDictWord| -> Uuid {
55-
let mut word_uuid = [0u8; 16];
55+
let mut word_uuid = [0u8; _];
5656
assert_ok(unsafe {
5757
// SAFETY:
5858
// - `dict.surface` and `dict.pronunciation` are valid.

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.88.0
1+
1.91.0

0 commit comments

Comments
 (0)