[T]::position_elem is deprecated.

This commit is contained in:
Simon Sapin 2015-08-04 17:34:39 +02:00
parent 1d47857be9
commit b2ee828520
2 changed files with 1 additions and 2 deletions

View file

@ -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());

View file

@ -9,7 +9,6 @@
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(plugin)]
#![feature(slice_position_elem)]
#![feature(vec_push_all)]
#![plugin(serde_macros)]