aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/global.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/global.rs')
-rw-r--r--components/script/dom/bindings/global.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/global.rs b/components/script/dom/bindings/global.rs
index e3b3f9cca1e..7bf8ecc343d 100644
--- a/components/script/dom/bindings/global.rs
+++ b/components/script/dom/bindings/global.rs
@@ -52,9 +52,9 @@ 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 JSRef<'b, Window> {
+ pub fn as_window<'b>(&'b self) -> JSRef<'b, Window> {
match *self {
- Window(ref window) => window,
+ Window(window) => window,
Worker(_) => fail!("expected a Window scope"),
}
}
@@ -107,8 +107,8 @@ impl GlobalField {
/// Create a new `GlobalField` from a rooted reference.
pub fn from_rooted(global: &GlobalRef) -> GlobalField {
match *global {
- Window(ref window) => WindowField(JS::from_rooted(window)),
- Worker(ref worker) => WorkerField(JS::from_rooted(worker)),
+ Window(window) => WindowField(JS::from_rooted(window)),
+ Worker(worker) => WorkerField(JS::from_rooted(worker)),
}
}