mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
parent
f051028ee8
commit
8953207f83
9 changed files with 184 additions and 5 deletions
|
@ -29,6 +29,10 @@ impl FlowList {
|
|||
self.flows.push_back(new_tail);
|
||||
}
|
||||
|
||||
pub fn back(&self) -> Option<&Flow> {
|
||||
self.flows.back().map(|x| &**x)
|
||||
}
|
||||
|
||||
/// Add an element first in the list
|
||||
///
|
||||
/// O(1)
|
||||
|
@ -40,6 +44,10 @@ impl FlowList {
|
|||
self.flows.pop_front()
|
||||
}
|
||||
|
||||
pub fn front(&self) -> Option<&Flow> {
|
||||
self.flows.front().map(|x| &**x)
|
||||
}
|
||||
|
||||
/// Create an empty list
|
||||
#[inline]
|
||||
pub fn new() -> FlowList {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue