mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
This commit is contained in:
parent
26045d7fcb
commit
d1b433a3b3
160 changed files with 1427 additions and 1162 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue