Fix read_n_i32 function name
This commit is contained in:
parent
e7c84aed9c
commit
7e76a21609
|
@ -167,8 +167,8 @@ impl TempoChanges {
|
|||
let mut cursor = Cursor::new(data);
|
||||
|
||||
let count = cursor.read_u32::<LE>()?.try_into()?;
|
||||
let measure = cursor.read_n_u32(count)?;
|
||||
let tempo_data = cursor.read_n_u32(count)?;
|
||||
let measure = cursor.read_n_i32(count)?;
|
||||
let tempo_data = cursor.read_n_i32(count)?;
|
||||
|
||||
let mut entries = Vec::new();
|
||||
|
||||
|
@ -220,7 +220,7 @@ impl Chart {
|
|||
let mut cursor = Cursor::new(data);
|
||||
|
||||
let count = cursor.read_u32::<LE>()?.try_into()?;
|
||||
let measures = cursor.read_n_u32(count)?;
|
||||
let measures = cursor.read_n_i32(count)?;
|
||||
let mut steps = vec![0; count];
|
||||
cursor.read_exact(&mut steps)?;
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ pub trait MiniParser: io::Read {
|
|||
Ok(buf.replace("\0", ""))
|
||||
}
|
||||
|
||||
/// Read `n` `u32`.
|
||||
/// Read `n` `i32`.
|
||||
#[inline]
|
||||
fn read_n_u32(&mut self, n: usize) -> Result<Vec<i32>, MiniParserError> {
|
||||
fn read_n_i32(&mut self, n: usize) -> Result<Vec<i32>, MiniParserError> {
|
||||
let mut buf = vec![0; 4 * n];
|
||||
self.read_exact(&mut buf)?;
|
||||
Ok(buf
|
||||
|
|
Reference in a new issue