Remove needless '&self mut' from VirtualMethods trait.

This commit is contained in:
Tetsuharu OHZEKI 2014-06-06 23:17:50 +09:00
parent d8483d2365
commit 2aa1554b0c
13 changed files with 109 additions and 102 deletions

View file

@ -68,12 +68,12 @@ impl<'a> PrivateHTMLAnchorElementHelpers for JSRef<'a, HTMLAnchorElement> {
}
impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> {
fn super_type<'a>(&'a mut self) -> Option<&'a mut VirtualMethods:> {
let htmlelement: &mut JSRef<HTMLElement> = HTMLElementCast::from_mut_ref(self);
Some(htmlelement as &mut VirtualMethods:)
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods:> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_ref(self);
Some(htmlelement as &VirtualMethods:)
}
fn handle_event(&mut self, event: &JSRef<Event>) {
fn handle_event(&self, event: &JSRef<Event>) {
match self.super_type() {
Some(s) => {
s.handle_event(event);