aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow_list.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/flow_list.rs')
-rw-r--r--components/layout/flow_list.rs29
1 files changed, 14 insertions, 15 deletions
diff --git a/components/layout/flow_list.rs b/components/layout/flow_list.rs
index 12e909c9c9b..a4b2abe0eb3 100644
--- a/components/layout/flow_list.rs
+++ b/components/layout/flow_list.rs
@@ -5,7 +5,7 @@
use flow::Flow;
use flow_ref::FlowRef;
-use std::collections::{Deque, dlist, DList};
+use std::collections::{dlist, DList};
// This needs to be reworked now that we have dynamically-sized types in Rust.
// Until then, it's just a wrapper around DList.
@@ -22,19 +22,6 @@ pub struct MutFlowListIterator<'a> {
it: dlist::MutItems<'a, FlowRef>,
}
-impl Collection for FlowList {
- /// O(1)
- #[inline]
- fn is_empty(&self) -> bool {
- self.flows.is_empty()
- }
- /// O(1)
- #[inline]
- fn len(&self) -> uint {
- self.flows.len()
- }
-}
-
impl FlowList {
/// Provide a reference to the front element, or None if the list is empty
#[inline]
@@ -78,7 +65,7 @@ impl FlowList {
///
/// O(1)
pub fn push_back(&mut self, new_tail: FlowRef) {
- self.flows.push(new_tail);
+ self.flows.push_back(new_tail);
}
/// Create an empty list
@@ -104,6 +91,18 @@ impl FlowList {
it: self.flows.iter_mut(),
}
}
+
+ /// O(1)
+ #[inline]
+ pub fn is_empty(&self) -> bool {
+ self.flows.is_empty()
+ }
+
+ /// O(1)
+ #[inline]
+ pub fn len(&self) -> uint {
+ self.flows.len()
+ }
}
impl<'a> Iterator<&'a Flow + 'a> for FlowListIterator<'a> {