rposition() -> rev().position() (#2)

This commit is contained in:
Vadim Petrochenkov 2017-02-24 04:57:16 +03:00 committed by Yamakaky
parent 227eab0b7f
commit 0982a28304

View File

@ -154,7 +154,7 @@ fn filter_frames(frames: &[Frame],
let skipped_before = frames.iter().position(|frame| {
is_good_frame(*frame, BAD_PREFIXES_TOP)
}).unwrap_or(frames.len());
let skipped_after = frames[skipped_before..].iter().rposition(|frame| {
let skipped_after = frames[skipped_before..].iter().rev().position(|frame| {
is_good_frame(*frame, BAD_PREFIXES_BOTTOM)
}).unwrap_or(frames.len() - skipped_before);