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)) }) }, 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