Remove the 'b 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:
Ms2ger 2015-01-01 12:20:31 +01:00
parent 95ec20bd97
commit 1290c18794
4 changed files with 27 additions and 27 deletions

View file

@ -32,9 +32,9 @@ pub enum GlobalRef<'a> {
}
/// A stack-based rooted reference to a global object.
pub enum GlobalRoot<'b> {
Window(Root<'b, window::Window>),
Worker(Root<'b, WorkerGlobalScope>),
pub enum GlobalRoot {
Window(Root<window::Window>),
Worker(Root<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<'b> GlobalRoot<'b> {
impl GlobalRoot {
/// 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> {