mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +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 {
|
||||
stack.push(name);
|
||||
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
|
||||
for &in_cycle in &stack[position..] {
|
||||
to_remove.insert(in_cycle.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue