Fix some warnings in layout.

This commit is contained in:
Ms2ger 2015-02-12 18:58:38 +01:00
parent 31f6595981
commit 2b0eb98c1d
7 changed files with 28 additions and 17 deletions

View file

@ -468,9 +468,7 @@ impl FragmentDisplayListBuilding for Fragment {
position_to_offset(gradient.stops[i - 1].position.unwrap(), length)
};
let (end_index, end_offset) =
match gradient.stops
.as_slice()
.slice_from(i)
match gradient.stops[i..]
.iter()
.enumerate()
.find(|&(_, ref stop)| stop.position.is_some()) {