mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
[T]::position_elem is deprecated.
This commit is contained in:
parent
1d47857be9
commit
b2ee828520
2 changed files with 1 additions and 2 deletions
|
@ -196,7 +196,7 @@ fn remove_cycles(map: &mut HashMap<&Atom, BorrowedValue>) {
|
||||||
if let Some(references) = value.references {
|
if let Some(references) = value.references {
|
||||||
stack.push(name);
|
stack.push(name);
|
||||||
for next in references {
|
for next in references {
|
||||||
if let Some(position) = stack.position_elem(&next) {
|
if let Some(position) = stack.iter().position(|&x| x == next) {
|
||||||
// Found a cycle
|
// Found a cycle
|
||||||
for &in_cycle in &stack[position..] {
|
for &in_cycle in &stack[position..] {
|
||||||
to_remove.insert(in_cycle.clone());
|
to_remove.insert(in_cycle.clone());
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![feature(custom_derive)]
|
#![feature(custom_derive)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(slice_position_elem)]
|
|
||||||
#![feature(vec_push_all)]
|
#![feature(vec_push_all)]
|
||||||
|
|
||||||
#![plugin(serde_macros)]
|
#![plugin(serde_macros)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue