Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency Rust to v1.75.0 #716

Merged
merged 2 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/voicevox_core/src/engine/full_context_label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static J1_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"(/J:(\d+|xx)_)").unwrap

fn string_feature_by_regex(re: &Regex, label: &str) -> std::result::Result<String, ErrorKind> {
if let Some(caps) = re.captures(label) {
Ok(caps.get(2).unwrap().as_str().to_string())
Ok(caps[2].to_string())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regex::Captures_.get(i).unwrap()_[i]が返すものが異なる。
(_.get(i).unwrap().to_str()_[i]が同じ)

} else {
Err(ErrorKind::LabelParse {
label: label.into(),
Expand Down Expand Up @@ -144,11 +144,11 @@ impl AccentPhrase {
!= phonemes.get(i + 1).unwrap().contexts().get("a2").unwrap()
{
if mora_phonemes.len() == 1 {
moras.push(Mora::new(None, mora_phonemes.get(0).unwrap().clone()));
moras.push(Mora::new(None, mora_phonemes[0].clone()));
} else if mora_phonemes.len() == 2 {
moras.push(Mora::new(
Some(mora_phonemes.get(0).unwrap().clone()),
mora_phonemes.get(1).unwrap().clone(),
Some(mora_phonemes[0].clone()),
mora_phonemes[1].clone(),
));
} else {
return Err(ErrorKind::TooLongMora { mora_phonemes });
Expand All @@ -157,7 +157,7 @@ impl AccentPhrase {
}
}

let mora = moras.get(0).unwrap();
let mora = &moras[0];
let mut accent: usize = mora
.vowel()
.contexts()
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.74.1
1.75.0
Loading