mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
Stop using position_elem.
It is unstable and not really better than the stable alternative.
This commit is contained in:
parent
8892f8175d
commit
c9f50f41b5
2 changed files with 2 additions and 4 deletions
|
@ -310,7 +310,7 @@ impl<'a> EventTargetMethods for &'a EventTarget {
|
|||
phase: phase,
|
||||
listener: EventListenerType::Additive(listener)
|
||||
};
|
||||
if entry.position_elem(&new_entry).is_none() {
|
||||
if !entry.contains(&new_entry) {
|
||||
entry.push(new_entry);
|
||||
}
|
||||
},
|
||||
|
@ -332,8 +332,7 @@ impl<'a> EventTargetMethods for &'a EventTarget {
|
|||
phase: phase,
|
||||
listener: EventListenerType::Additive(listener.clone())
|
||||
};
|
||||
let position = entry.position_elem(&old_entry);
|
||||
for &position in position.iter() {
|
||||
if let Some(position) = entry.iter().position(|e| *e == old_entry) {
|
||||
entry.remove(position);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#![feature(plugin)]
|
||||
#![feature(rc_unique)]
|
||||
#![feature(slice_chars)]
|
||||
#![feature(slice_position_elem)]
|
||||
#![feature(str_utf16)]
|
||||
#![feature(vec_push_all)]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue