mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Replace unsafe_blocks by unsafe_code.
This commit is contained in:
parent
4eb26065ac
commit
3479d3fa7f
53 changed files with 151 additions and 57 deletions
|
@ -31,6 +31,7 @@ impl FlowList {
|
|||
|
||||
/// Provide a mutable reference to the front element, or None if the list is empty
|
||||
#[inline]
|
||||
#[allow(unsafe_code)]
|
||||
pub unsafe fn front_mut<'a>(&'a mut self) -> Option<&'a mut Flow> {
|
||||
self.flows.front_mut().map(|head| &mut **head)
|
||||
}
|
||||
|
@ -43,6 +44,7 @@ impl FlowList {
|
|||
|
||||
/// Provide a mutable reference to the back element, or None if the list is empty
|
||||
#[inline]
|
||||
#[allow(unsafe_code)]
|
||||
pub unsafe fn back_mut<'a>(&'a mut self) -> Option<&'a mut Flow> {
|
||||
self.flows.back_mut().map(|tail| &mut **tail)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue