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

Clippy fixes #2614

Merged
merged 9 commits into from Apr 6, 2018

webrender: Directly return let result.

  • Loading branch information
waywardmonkeys committed Apr 5, 2018
commit 1886f696f161a64f782ad34d31073e00df1904b8
@@ -251,14 +251,13 @@ impl ClipScrollTree {
scroll_node_at_point_index
}
(_, scroll_node_at_point_index, Some(cached_node_index)) => {
let node_index = match self.nodes.get(cached_node_index.0) {
match self.nodes.get(cached_node_index.0) {
Some(_) => cached_node_index,
None => {
self.currently_scrolling_node_index = Some(scroll_node_at_point_index);
scroll_node_at_point_index
}
};
node_index
}
}
(_, _, None) => return false,
};
@@ -870,16 +870,14 @@ impl<'a> DisplayListFlattener<'a> {
Some(self.clip_store.insert(ClipSources::new(clip_sources)))
};

let prim_index = self.prim_store.add_primitive(
self.prim_store.add_primitive(
&info.rect,
&info.clip_rect,
info.is_backface_visible && stacking_context.is_backface_visible,
clip_sources,
info.tag,
container,
);

prim_index
)
}

pub fn add_primitive_to_hit_testing_list(
@@ -147,16 +147,14 @@ fn get_glyph_metrics(
let width = right - left;
let height = top - bottom;

let metrics = GlyphMetrics {
GlyphMetrics {
rasterized_left: left,
rasterized_width: width as u32,
rasterized_height: height as u32,
rasterized_ascent: top,
rasterized_descent: -bottom,
advance: advance.width as f32,
};

metrics
}
}

#[link(name = "ApplicationServices", kind = "framework")]
@@ -508,7 +508,7 @@ impl RenderTask {

let blur_task_v_id = render_tasks.add(blur_task_v);

let blur_task_h = RenderTask {
RenderTask {
children: vec![blur_task_v_id],
location: RenderTaskLocation::Dynamic(None, adjusted_blur_target_size),
kind: RenderTaskKind::HorizontalBlur(BlurTask {
@@ -518,9 +518,7 @@ impl RenderTask {
}),
clear_mode,
saved_index: None,
};

blur_task_h
}
}

pub fn new_scaling(
@@ -100,8 +100,7 @@ fn next(cur: f32, prev: f32, dest: f32, stiffness: f32, damping: f32) -> f32 {
let nextv = vel + acc;

// Calculate next position by integrating velocity. Scale to framerate.
let next = cur + nextv;
next
cur + nextv
}

/// Given numbers, calculate if a spring is at rest.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.