From b2ee8285208124f250230f0e371f7734c5e40489 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 4 Aug 2015 17:34:39 +0200 Subject: [PATCH] [T]::position_elem is deprecated. --- components/style/custom_properties.rs | 2 +- components/style/lib.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index 39d2cbcca4b..7c816185ee7 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -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()); diff --git a/components/style/lib.rs b/components/style/lib.rs index 0822c67dd91..1d7622ce088 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -9,7 +9,6 @@ #![feature(custom_attribute)] #![feature(custom_derive)] #![feature(plugin)] -#![feature(slice_position_elem)] #![feature(vec_push_all)] #![plugin(serde_macros)]