From bb6052ca8e550eee079958e782b9162b1b526603 Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 30 May 2019 14:28:39 +0200 Subject: [PATCH] Some further removals --- components/layout/flow.rs | 8 -------- components/layout/flow_list.rs | 6 ------ components/layout/traversal.rs | 6 ------ 3 files changed, 20 deletions(-) diff --git a/components/layout/flow.rs b/components/layout/flow.rs index da877106f343..bcc38252b9b1 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -51,7 +51,6 @@ use num_traits::cast::FromPrimitive; use serde::ser::{Serialize, SerializeStruct, Serializer}; use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect, MaxRect}; use std::fmt; -use std::iter::Zip; use std::slice::IterMut; use std::sync::atomic::Ordering; use std::sync::Arc; @@ -128,11 +127,6 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static { panic!("called as_flex() on a non-flex flow") } - /// If this is a flex flow, returns the underlying object, borrowed mutably. Fails otherwise. - fn as_mut_flex(&mut self) -> &mut FlexFlow { - panic!("called as_mut_flex() on a non-flex flow") - } - /// If this is an inline flow, returns the underlying object. Fails otherwise. fn as_inline(&self) -> &InlineFlow { panic!("called as_inline() on a non-inline flow") @@ -786,8 +780,6 @@ impl<'a> Iterator for AbsoluteDescendantIter<'a> { } } -pub type AbsoluteDescendantOffsetIter<'a> = Zip, IterMut<'a, Au>>; - /// Information needed to compute absolute (i.e. viewport-relative) flow positions (not to be /// confused with absolutely-positioned flows) that is computed during block-size assignment. #[derive(Clone, Copy)] diff --git a/components/layout/flow_list.rs b/components/layout/flow_list.rs index 4abd3f470861..a27db03920a0 100644 --- a/components/layout/flow_list.rs +++ b/components/layout/flow_list.rs @@ -125,12 +125,6 @@ impl FlowList { } } - /// O(1) - #[inline] - pub fn is_empty(&self) -> bool { - self.flows.is_empty() - } - /// O(1) #[inline] pub fn len(&self) -> usize { diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs index 6d44fcfc5e40..e968c1843418 100644 --- a/components/layout/traversal.rs +++ b/components/layout/traversal.rs @@ -24,12 +24,6 @@ pub struct RecalcStyleAndConstructFlows<'a> { context: LayoutContext<'a>, } -impl<'a> RecalcStyleAndConstructFlows<'a> { - pub fn layout_context(&self) -> &LayoutContext<'a> { - &self.context - } -} - impl<'a> RecalcStyleAndConstructFlows<'a> { /// Creates a traversal context, taking ownership of the shared layout context. pub fn new(context: LayoutContext<'a>) -> Self {