mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all
This commit is contained in:
parent
b756375637
commit
e8c12c1c6d
17 changed files with 23 additions and 30 deletions
|
@ -49,7 +49,7 @@ impl<'a> CanvasPaintTask<'a> {
|
|||
//copy the data to the destination vector
|
||||
for _ in 0..src_read_rect.size.height {
|
||||
let row = &src_data[src .. src + (4 * src_read_rect.size.width) as usize];
|
||||
image_data.push_all(row);
|
||||
image_data.extend_from_slice(row);
|
||||
src += stride as usize;
|
||||
}
|
||||
|
||||
|
@ -707,7 +707,7 @@ fn crop_image(image_data: Vec<u8>,
|
|||
let mut src = (crop_rect.origin.y * stride + crop_rect.origin.x * 4) as usize;
|
||||
for _ in 0..crop_rect.size.height {
|
||||
let row = &image_data[src .. src + (4 * crop_rect.size.width) as usize];
|
||||
new_image_data.push_all(row);
|
||||
new_image_data.extend_from_slice(row);
|
||||
src += stride as usize;
|
||||
}
|
||||
new_image_data
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#![feature(core)]
|
||||
#![feature(nonzero)]
|
||||
#![feature(slice_bytes)]
|
||||
#![feature(vec_push_all)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue