Skip to content
Permalink
Browse files

Fix Equiv related deprecation warnings

...except where we have our own implementations of Equiv.
  • Loading branch information
mttr committed Jan 8, 2015
1 parent 7bbce60 commit 020a767849e9979649909a1c7c3052524fd7bae2
@@ -87,14 +87,14 @@ impl EventTarget {
}

pub fn get_listeners(&self, type_: &str) -> Option<Vec<EventListener>> {
self.handlers.borrow().find_equiv(type_).map(|listeners| {
self.handlers.borrow().get(type_).map(|listeners| {
listeners.iter().map(|entry| entry.listener.get_listener()).collect()
})
}

pub fn get_listeners_for(&self, type_: &str, desired_phase: ListenerPhase)
-> Option<Vec<EventListener>> {
self.handlers.borrow().find_equiv(type_).map(|listeners| {
self.handlers.borrow().get(type_).map(|listeners| {
let filtered = listeners.iter().filter(|entry| entry.phase == desired_phase);
filtered.map(|entry| entry.listener.get_listener()).collect()
})
@@ -81,7 +81,7 @@ impl<'a> FormDataMethods for JSRef<'a, FormData> {
}

fn Get(self, name: DOMString) -> Option<FileOrString> {
if self.data.borrow().contains_key_equiv(&name) {
if self.data.borrow().contains_key(&name) {
match (*self.data.borrow())[name][0].clone() {
FormDatum::StringData(ref s) => Some(eString(s.clone())),
FormDatum::FileData(ref f) => {
@@ -94,7 +94,7 @@ impl<'a> FormDataMethods for JSRef<'a, FormData> {
}

fn Has(self, name: DOMString) -> bool {
self.data.borrow().contains_key_equiv(&name)
self.data.borrow().contains_key(&name)
}
#[allow(unrooted_must_root)]
fn Set(self, name: DOMString, value: JSRef<Blob>, filename: Option<DOMString>) {
@@ -80,11 +80,11 @@ impl<'a> URLSearchParamsMethods for JSRef<'a, URLSearchParams> {
}

fn Get(self, name: DOMString) -> Option<DOMString> {
self.data.borrow().find_equiv(&name).map(|v| v[0].clone())
self.data.borrow().get(&name).map(|v| v[0].clone())
}

fn Has(self, name: DOMString) -> bool {
self.data.borrow().contains_key_equiv(&name)
self.data.borrow().contains_key(&name)
}

fn Set(self, name: DOMString, value: DOMString) {

5 comments on commit 020a767

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jan 8, 2015

saw approval from jdm
at mttr@020a767

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jan 8, 2015

merging mttr/servo/warnings = 020a767 into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jan 8, 2015

mttr/servo/warnings = 020a767 merged ok, testing candidate = 0793137

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Jan 8, 2015

fast-forwarding master to auto = 0793137

Please sign in to comment.
You can’t perform that action at this time.