diff --git a/Cargo.lock b/Cargo.lock index 5f81c0b..584960f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1144,6 +1144,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" @@ -2780,17 +2791,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"] } 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);