mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove the 'a lifetime from Root.
It does not add any safety, as the reference is constructed from a raw pointer without limiting the lifetime in any way.
This commit is contained in:
parent
111a196e9d
commit
95ec20bd97
4 changed files with 27 additions and 27 deletions
|
@ -32,9 +32,9 @@ pub enum GlobalRef<'a> {
|
|||
}
|
||||
|
||||
/// A stack-based rooted reference to a global object.
|
||||
pub enum GlobalRoot<'a, 'b> {
|
||||
Window(Root<'a, 'b, window::Window>),
|
||||
Worker(Root<'a, 'b, WorkerGlobalScope>),
|
||||
pub enum GlobalRoot<'b> {
|
||||
Window(Root<'b, window::Window>),
|
||||
Worker(Root<'b, WorkerGlobalScope>),
|
||||
}
|
||||
|
||||
/// A traced reference to a global object, for use in fields of traced Rust
|
||||
|
@ -98,7 +98,7 @@ impl<'a> Reflectable for GlobalRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, 'b> GlobalRoot<'a, 'b> {
|
||||
impl<'b> GlobalRoot<'b> {
|
||||
/// Obtain a safe reference to the global object that cannot outlive the
|
||||
/// lifetime of this root.
|
||||
pub fn root_ref<'c>(&'c self) -> GlobalRef<'c> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue