diff --git a/source/marathon/defl.rs b/source/marathon/defl.rs index 2580240..0693647 100644 --- a/source/marathon/defl.rs +++ b/source/marathon/defl.rs @@ -202,7 +202,7 @@ fn stream_literal(v: &mut Vec, b: &[u8], p: usize) -> ResultS } p += 4; - v.extend_from_slice(ok!(b.get(p..p + len), "not enough data")?); + v.extend(ok!(b.get(p..p + len), "not enough data")?); Ok((p + len) * 8) } diff --git a/source/marathon/shp.rs b/source/marathon/shp.rs index a387234..d310497 100644 --- a/source/marathon/shp.rs +++ b/source/marathon/shp.rs @@ -103,7 +103,7 @@ pub fn read_bitmap(b: &[u8]) -> ResultS bmp.cr.push(0); } - bmp.cr.extend_from_slice(ok!(b.get(p..p + end), "not enough data")?); + bmp.cr.extend(ok!(b.get(p..p + end), "not enough data")?); for _ in lst..pitch { bmp.cr.push(0); @@ -113,8 +113,7 @@ pub fn read_bitmap(b: &[u8]) -> ResultS } } else { // simple copy - bmp.cr.extend_from_slice(ok!(b.get(p..p + width * height), - "not enough data")?); + bmp.cr.extend(ok!(b.get(p..p + width * height), "not enough data")?); } Ok(bmp)