mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Undo elision for trait object; trait objects are strange
This commit is contained in:
parent
e94df1ed5c
commit
5c24da3e2d
1 changed files with 4 additions and 4 deletions
|
@ -25,27 +25,27 @@ pub struct MutFlowListIterator<'a> {
|
|||
impl FlowList {
|
||||
/// Provide a reference to the front element, or None if the list is empty
|
||||
#[inline]
|
||||
pub fn front(&self) -> Option<&Flow> {
|
||||
pub fn front<'a>(&'a self) -> Option<&'a Flow> {
|
||||
self.flows.front().map(|head| &**head)
|
||||
}
|
||||
|
||||
/// Provide a mutable reference to the front element, or None if the list is empty
|
||||
#[inline]
|
||||
#[allow(unsafe_code)]
|
||||
pub unsafe fn front_mut(&mut self) -> Option<&mut Flow> {
|
||||
pub unsafe fn front_mut<'a>(&'a mut self) -> Option<&'a mut Flow> {
|
||||
self.flows.front_mut().map(flow_ref::deref_mut)
|
||||
}
|
||||
|
||||
/// Provide a reference to the back element, or None if the list is empty
|
||||
#[inline]
|
||||
pub fn back(&self) -> Option<&Flow> {
|
||||
pub fn back<'a>(&'a self) -> Option<&'a Flow> {
|
||||
self.flows.back().map(|tail| &**tail)
|
||||
}
|
||||
|
||||
/// Provide a mutable reference to the back element, or None if the list is empty
|
||||
#[inline]
|
||||
#[allow(unsafe_code)]
|
||||
pub unsafe fn back_mut(&mut self) -> Option<&mut Flow> {
|
||||
pub unsafe fn back_mut<'a>(&'a mut self) -> Option<&'a mut Flow> {
|
||||
self.flows.back_mut().map(flow_ref::deref_mut)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue