mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move away from the repeat().take().collect() pattern.
This was the preferred pattern between the deprecation of Vec::from_elem and the addition of the count argument to the vec![] macro.
This commit is contained in:
parent
6a728712f9
commit
ce4d442941
6 changed files with 7 additions and 16 deletions
|
@ -39,7 +39,6 @@ use net_traits::image_cache_task::UsePlaceholder;
|
|||
use net_traits::image::base::{Image, PixelFormat};
|
||||
use std::cmp;
|
||||
use std::default::Default;
|
||||
use std::iter::repeat;
|
||||
use std::sync::Arc;
|
||||
use std::f32;
|
||||
use style::computed_values::filter::Filter;
|
||||
|
@ -1104,7 +1103,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
CanvasCommonMsg::SendPixelContents(sender))).unwrap();
|
||||
receiver.recv().unwrap()
|
||||
},
|
||||
None => repeat(0xFFu8).take(width * height * 4).collect(),
|
||||
None => vec![0xFFu8; width * height * 4],
|
||||
};
|
||||
display_list.content.push_back(DisplayItem::ImageClass(box ImageDisplayItem{
|
||||
base: BaseDisplayItem::new(stacking_relative_content_box,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue