mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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)]
|
#[allow(unsafe_code)]
|
||||||
pub trait LayoutCharacterDataHelpers {
|
pub trait LayoutCharacterDataHelpers<'dom> {
|
||||||
unsafe fn data_for_layout(&self) -> &str;
|
unsafe fn data_for_layout(self) -> &'dom str;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
impl LayoutCharacterDataHelpers for LayoutDom<'_, CharacterData> {
|
impl<'dom> LayoutCharacterDataHelpers<'dom> for LayoutDom<'dom, CharacterData> {
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn data_for_layout(&self) -> &str {
|
unsafe fn data_for_layout(self) -> &'dom str {
|
||||||
&(*self.unsafe_get()).data.borrow_for_layout()
|
&(*self.unsafe_get()).data.borrow_for_layout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue