mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Give a lifetime parameter to LayoutCharacterDataHelpers
This commit is contained in:
parent
d87444cb1f
commit
f0c98bfa5c
1 changed files with 4 additions and 4 deletions
|
@ -281,14 +281,14 @@ impl CharacterDataMethods for CharacterData {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub trait LayoutCharacterDataHelpers {
|
||||
unsafe fn data_for_layout(&self) -> &str;
|
||||
pub trait LayoutCharacterDataHelpers<'dom> {
|
||||
unsafe fn data_for_layout(self) -> &'dom str;
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
impl LayoutCharacterDataHelpers for LayoutDom<'_, CharacterData> {
|
||||
impl<'dom> LayoutCharacterDataHelpers<'dom> for LayoutDom<'dom, CharacterData> {
|
||||
#[inline]
|
||||
unsafe fn data_for_layout(&self) -> &str {
|
||||
unsafe fn data_for_layout(self) -> &'dom str {
|
||||
&(*self.unsafe_get()).data.borrow_for_layout()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue