mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #8922 - saneyuki:warning, r=mbrubeck
Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8922) <!-- Reviewable:end -->
This commit is contained in:
commit
d01233a7b4
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
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#![feature(nonzero)]
|
||||
#![feature(slice_bytes)]
|
||||
#![feature(vec_push_all)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue