From 2fe90c6ede42e7d2e85495c1ca68f1e5aaa70cf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 09:11:15 +0000 Subject: [PATCH 1/2] build(deps): bump tokio from 1.45.1 to 1.46.1 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.45.1 to 1.46.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.45.1...tokio-1.46.1) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.46.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 17 +++++++++++++++-- crates/sbv2_api/Cargo.toml | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d3fea9..fab2a57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1097,6 +1097,17 @@ version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" +[[package]] +name = "io-uring" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +dependencies = [ + "bitflags 2.9.0", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -2726,17 +2737,19 @@ dependencies = [ [[package]] name = "tokio" -version = "1.45.1" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", + "slab", "socket2", "tokio-macros", "windows-sys 0.52.0", diff --git a/crates/sbv2_api/Cargo.toml b/crates/sbv2_api/Cargo.toml index c3a7bb1..44ea6e3 100644 --- a/crates/sbv2_api/Cargo.toml +++ b/crates/sbv2_api/Cargo.toml @@ -16,7 +16,7 @@ env_logger.workspace = true log = "0.4.22" sbv2_core = { version = "0.2.0-alpha6", path = "../sbv2_core", features = ["aivmx"] } serde = { version = "1.0.210", features = ["derive"] } -tokio = { version = "1.45.1", features = ["full"] } +tokio = { version = "1.46.1", features = ["full"] } utoipa = { version = "5.4.0", features = ["axum_extras"] } utoipa-scalar = { version = "0.3.0", features = ["axum"] } From 98ddaa3c582eec796b665bc07f553628fa0db755 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Mon, 21 Jul 2025 11:38:11 +0900 Subject: [PATCH 2/2] format by cargo fmt --- crates/sbv2_core/src/jtalk.rs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/crates/sbv2_core/src/jtalk.rs b/crates/sbv2_core/src/jtalk.rs index 778d98d..a4646ab 100644 --- a/crates/sbv2_core/src/jtalk.rs +++ b/crates/sbv2_core/src/jtalk.rs @@ -123,7 +123,7 @@ impl JTalkProcess { .map(|(_letter, tone)| *tone) .collect(); if tone_values.len() == 1 { - assert!(tone_values == hash_set![0], "{:?}", tone_values); + assert!(tone_values == hash_set![0], "{tone_values:?}"); Ok(phone_tone_list) } else if tone_values.len() == 2 { if tone_values == hash_set![0, 1] { @@ -226,12 +226,12 @@ impl JTalkProcess { } else if PUNCTUATIONS.contains(&phone.as_str()) { result.push((phone, 0)); } else { - println!("phones {:?}", phone_with_punct); - println!("phone_tone_list: {:?}", phone_tone_list); - println!("result: {:?}", result); - println!("tone_index: {:?}", tone_index); - println!("phone: {:?}", phone); - return Err(Error::ValueError(format!("Mismatched phoneme: {}", phone))); + println!("phones {phone_with_punct:?}"); + println!("phone_tone_list: {phone_tone_list:?}"); + println!("result: {result:?}"); + println!("tone_index: {tone_index:?}"); + println!("phone: {phone:?}"); + return Err(Error::ValueError(format!("Mismatched phoneme: {phone}"))); } } @@ -276,8 +276,7 @@ impl JTalkProcess { } if !KATAKANA_PATTERN.is_match(&text) { return Err(Error::ValueError(format!( - "Input must be katakana only: {}", - text + "Input must be katakana only: {text}" ))); } @@ -285,7 +284,7 @@ impl JTalkProcess { let mora = mora.to_string(); let (consonant, vowel) = MORA_KATA_TO_MORA_PHONEMES.get(&mora).unwrap(); if consonant.is_none() { - text = text.replace(&mora, &format!(" {}", vowel)); + text = text.replace(&mora, &format!(" {vowel}")); } else { text = text.replace( &mora, @@ -319,7 +318,7 @@ impl JTalkProcess { let (string, pron) = self.parse_to_string_and_pron(parts.clone()); let mut yomi = pron.replace('’', ""); let word = replace_punctuation(string); - assert!(!yomi.is_empty(), "Empty yomi: {}", word); + assert!(!yomi.is_empty(), "Empty yomi: {word}"); if yomi == "、" { if !word .chars() @@ -330,7 +329,7 @@ impl JTalkProcess { yomi = word.clone(); } } else if yomi == "?" { - assert!(word == "?", "yomi `?` comes from: {}", word); + assert!(word == "?", "yomi `?` comes from: {word}"); yomi = "?".to_string(); } seq_text.push(word);