Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address some issues found by rust-clippy. #202

Merged
merged 4 commits into from Feb 26, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prefer '&[..]' over '&Vec<..>'.

  • Loading branch information
frewsxcv committed Feb 26, 2016
commit 83d71afd43a7d86a6f07df997bb40acf39b367c8
@@ -289,7 +289,7 @@ impl<'a> BatchBuilder<'a> {
old_rect
}

pub fn push_complex_clip(&mut self, clip: &Vec<ComplexClipRegion>) {
pub fn push_complex_clip(&mut self, clip: &[ComplexClipRegion]) {
// TODO(gw): Handle nested complex clips!
debug_assert!(clip.len() == 0 || clip.len() == 1);
if clip.len() == 1 {
@@ -181,7 +181,7 @@ impl RenderTarget {
resource_cache: &mut ResourceCache,
draw_list_groups: &HashMap<DrawListGroupId, DrawListGroup, BuildHasherDefault<FnvHasher>>,
layers: &HashMap<ScrollLayerId, Layer, BuildHasherDefault<FnvHasher>>,
stacking_context_info: &Vec<StackingContextInfo>,
stacking_context_info: &[StackingContextInfo],
device_pixel_ratio: f32) -> DrawLayer {
let mut commands = vec![];
for item in &self.items {
@@ -776,7 +776,7 @@ impl Frame {
}

fn add_items_to_target(&mut self,
scene_items: &Vec<SceneItem>,
scene_items: &[SceneItem],
info: &FlattenInfo,
target: &mut RenderTarget,
context: &mut FlattenContext,
@@ -19,7 +19,7 @@ pub trait NodeCompiler {
resource_cache: &ResourceCache,
frame_id: FrameId,
device_pixel_ratio: f32,
stacking_context_info: &Vec<StackingContextInfo>,
stacking_context_info: &[StackingContextInfo],
draw_list_groups: &HashMap<DrawListGroupId, DrawListGroup, BuildHasherDefault<FnvHasher>>);
}

@@ -28,7 +28,7 @@ impl NodeCompiler for AABBTreeNode {
resource_cache: &ResourceCache,
frame_id: FrameId,
device_pixel_ratio: f32,
stacking_context_info: &Vec<StackingContextInfo>,
stacking_context_info: &[StackingContextInfo],
draw_list_groups: &HashMap<DrawListGroupId, DrawListGroup, BuildHasherDefault<FnvHasher>>) {
let mut compiled_node = CompiledNode::new();
let mut vertex_buffer = VertexBuffer::new();
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.