From 1eeef178ea9f6c5462409271105b7eb399325755 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 05:16:38 +0000 Subject: [PATCH 1/2] Update dependency Rust to v1.73.0 --- rust-toolchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain b/rust-toolchain index 68bc7ff2a..5e3a42566 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.71.1 +1.73.0 From 53c94fee99b11d2633ac6c4b601406df690dfae2 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Fri, 13 Oct 2023 01:17:50 +0900 Subject: [PATCH 2/2] Fix Clippy lints --- crates/voicevox_core/src/voice_model.rs | 4 ++-- crates/voicevox_core_c_api/src/compatible_engine.rs | 4 ++-- crates/voicevox_core_python_api/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/voicevox_core/src/voice_model.rs b/crates/voicevox_core/src/voice_model.rs index e17d862fc..8a86a4399 100644 --- a/crates/voicevox_core/src/voice_model.rs +++ b/crates/voicevox_core/src/voice_model.rs @@ -179,7 +179,7 @@ impl VvmEntryReader { } async fn read_vvm_entry(&self, filename: &str) -> LoadModelResult> { - (|| async { + async { let me = self .entry_map .get(filename) @@ -190,7 +190,7 @@ impl VvmEntryReader { .read_to_end_checked(&mut buf, &me.entry) .await?; Ok::<_, anyhow::Error>(buf) - })() + } .await .map_err(|source| LoadModelError { path: self.reader.path().to_owned(), diff --git a/crates/voicevox_core_c_api/src/compatible_engine.rs b/crates/voicevox_core_c_api/src/compatible_engine.rs index 92d007e94..64470c7bf 100644 --- a/crates/voicevox_core_c_api/src/compatible_engine.rs +++ b/crates/voicevox_core_c_api/src/compatible_engine.rs @@ -68,7 +68,7 @@ fn set_message(message: &str) { #[no_mangle] pub extern "C" fn initialize(use_gpu: bool, cpu_num_threads: c_int, load_all_models: bool) -> bool { - let result = RUNTIME.block_on((|| async { + let result = RUNTIME.block_on(async { let synthesizer = voicevox_core::Synthesizer::new_with_initialize( Arc::new(OpenJtalk::new_without_dic()), &voicevox_core::InitializeOptions { @@ -89,7 +89,7 @@ pub extern "C" fn initialize(use_gpu: bool, cpu_num_threads: c_int, load_all_mod } Ok::<_, voicevox_core::Error>(synthesizer) - })()); + }); match result { Ok(synthesizer) => { diff --git a/crates/voicevox_core_python_api/src/lib.rs b/crates/voicevox_core_python_api/src/lib.rs index 42d3feaeb..adabd09ae 100644 --- a/crates/voicevox_core_python_api/src/lib.rs +++ b/crates/voicevox_core_python_api/src/lib.rs @@ -283,7 +283,7 @@ impl Synthesizer { .iter() .map(|ap| to_pydantic_dataclass(ap, class)) .collect::>>(); - let list = PyList::new(py, accent_phrases.into_iter()); + let list = PyList::new(py, accent_phrases); Ok(list.to_object(py)) }) }, @@ -314,7 +314,7 @@ impl Synthesizer { .iter() .map(|ap| to_pydantic_dataclass(ap, class)) .collect::>>(); - let list = PyList::new(py, accent_phrases.into_iter()); + let list = PyList::new(py, accent_phrases); Ok(list.to_object(py)) }) },