mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix a bunch of clippy lints
This commit is contained in:
parent
b1ca3d1cdf
commit
6b215f38ee
58 changed files with 281 additions and 356 deletions
|
@ -512,14 +512,12 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
|
||||
(Msg::ScrollTimeout(timestamp), ShutdownState::NotShuttingDown) => {
|
||||
debug!("scroll timeout, drawing unpainted content!");
|
||||
match self.composition_request {
|
||||
CompositionRequest::CompositeOnScrollTimeout(this_timestamp) => {
|
||||
if timestamp == this_timestamp {
|
||||
self.composition_request = CompositionRequest::CompositeNow(
|
||||
CompositingReason::HitScrollTimeout)
|
||||
}
|
||||
if let CompositionRequest::CompositeOnScrollTimeout(this_timestamp) =
|
||||
self.composition_request {
|
||||
if timestamp == this_timestamp {
|
||||
self.composition_request = CompositionRequest::CompositeNow(
|
||||
CompositingReason::HitScrollTimeout)
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -644,7 +642,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
if !self.pipeline_details.contains_key(&pipeline_id) {
|
||||
self.pipeline_details.insert(pipeline_id, PipelineDetails::new());
|
||||
}
|
||||
return self.pipeline_details.get_mut(&pipeline_id).unwrap();
|
||||
self.pipeline_details.get_mut(&pipeline_id).unwrap()
|
||||
}
|
||||
|
||||
pub fn pipeline(&self, pipeline_id: PipelineId) -> Option<&CompositionPipeline> {
|
||||
|
@ -730,7 +728,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
root_layer.bounds.borrow_mut().size = Size2D::from_untyped(&frame_size);
|
||||
}
|
||||
|
||||
return root_layer;
|
||||
root_layer
|
||||
}
|
||||
|
||||
fn create_pipeline_details_for_frame_tree(&mut self, frame_tree: &SendableFrameTree) {
|
||||
|
@ -1223,11 +1221,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
result.layer.send_event(self, TouchEvent(TouchEventType::Up, identifier,
|
||||
result.point.to_untyped()));
|
||||
}
|
||||
match self.touch_handler.on_touch_up(identifier, point) {
|
||||
TouchAction::Click => {
|
||||
self.simulate_mouse_click(point);
|
||||
}
|
||||
_ => {}
|
||||
if let TouchAction::Click = self.touch_handler.on_touch_up(identifier, point) {
|
||||
self.simulate_mouse_click(point);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1882,7 +1877,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
return None;
|
||||
}
|
||||
|
||||
return Some(HitTestResult { layer: layer, point: point_in_parent_layer });
|
||||
Some(HitTestResult { layer: layer, point: point_in_parent_layer })
|
||||
}
|
||||
|
||||
fn find_topmost_layer_at_point(&self,
|
||||
|
@ -2001,7 +1996,7 @@ fn find_layer_with_pipeline_and_layer_id_for_layer(layer: Rc<Layer<CompositorDat
|
|||
}
|
||||
}
|
||||
|
||||
return None;
|
||||
None
|
||||
}
|
||||
|
||||
impl<Window> CompositorEventListener for IOCompositor<Window> where Window: WindowMethods {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue