Skip to content

Commit ded91a1

Browse files
committed
Qualify calls to try_reserve and try_push to avoid clash with Nightly libstd.
1 parent 422d1ba commit ded91a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mp4parse/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const TABLE_SIZE_LIMIT: u32 = 30 * 60 * 60 * 24 * 7;
4545
pub fn vec_push<T>(vec: &mut Vec<T>, val: T) -> std::result::Result<(), ()> {
4646
#[cfg(feature = "mp4parse_fallible")]
4747
{
48-
return vec.try_push(val);
48+
return FallibleVec::try_push(vec, val);
4949
}
5050

5151
vec.push(val);
@@ -56,7 +56,7 @@ pub fn vec_push<T>(vec: &mut Vec<T>, val: T) -> std::result::Result<(), ()> {
5656
pub fn vec_reserve<T>(vec: &mut Vec<T>, size: usize) -> std::result::Result<(), ()> {
5757
#[cfg(feature = "mp4parse_fallible")]
5858
{
59-
return vec.try_reserve(size);
59+
return FallibleVec::try_reserve(vec, size);
6060
}
6161

6262
vec.reserve(size);
@@ -68,7 +68,7 @@ fn allocate_read_buf(size: usize) -> std::result::Result<Vec<u8>, ()> {
6868
#[cfg(feature = "mp4parse_fallible")]
6969
{
7070
let mut buf: Vec<u8> = Vec::new();
71-
buf.try_reserve(size)?;
71+
FallibleVec::try_reserve(&mut buf, size)?;
7272
unsafe { buf.set_len(size); }
7373
return Ok(buf);
7474
}

0 commit comments

Comments
 (0)