mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove explicit lifetimes which can be elided.
This commit is contained in:
parent
11d23a41b3
commit
88991013ab
39 changed files with 66 additions and 66 deletions
|
@ -65,7 +65,7 @@ impl<'a> GlobalRef<'a> {
|
|||
|
||||
/// Extract a `Window`, causing task failure if the global object is not
|
||||
/// a `Window`.
|
||||
pub fn as_window<'b>(&'b self) -> &'b window::Window {
|
||||
pub fn as_window(&self) -> &window::Window {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window,
|
||||
GlobalRef::Worker(_) => panic!("expected a Window scope"),
|
||||
|
@ -189,7 +189,7 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
|
||||
impl<'a> Reflectable for GlobalRef<'a> {
|
||||
fn reflector<'b>(&'b self) -> &'b Reflector {
|
||||
fn reflector(&self) -> &Reflector {
|
||||
match *self {
|
||||
GlobalRef::Window(ref window) => window.reflector(),
|
||||
GlobalRef::Worker(ref worker) => worker.reflector(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue