Skip to content

Commit 41adbbc

Browse files
committed
fix: various Vec mistakes
1 parent 55949ed commit 41adbbc

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

assets/bold.ttf

4.99 KB
Binary file not shown.

phira/src/scene/chapter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl ChapterScene {
107107
"c1" => vec!["snow", "jumping23"],
108108
_ => vec![],
109109
};
110-
let mut charts = Vec::with_capacity(songs.capacity());
110+
let mut charts = Vec::with_capacity(songs.len());
111111
for song in songs {
112112
let info = serde_yaml::from_slice(&load_file(&format!("res/song/{song}/info.yml")).await?)?;
113113
let illu = load_res_tex(&format!("res/song/{song}/cover")).await;

prpr/src/judge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ impl Judge {
478478
.collect();
479479
// pos[line][touch]
480480
let mut pos = Vec::<Vec<Option<Point>>>::with_capacity(chart.lines.len());
481-
for id in 0..pos.capacity() {
481+
for id in 0..chart.lines.len() {
482482
chart.lines[id].object.set_time(t);
483483
let inv = chart.lines[id].now_transform(res, &chart.lines).try_inverse().unwrap();
484484
pos.push(

0 commit comments

Comments
 (0)